org.terracotta.cluster
Class TerracottaLogger

java.lang.Object
  extended by org.terracotta.cluster.TerracottaLogger
All Implemented Interfaces:
ClusterLogger

public class TerracottaLogger
extends Object
implements ClusterLogger

A ClusterLogger implementation that directs logging messages into the Terracotta logging system, and thereby into the Terracotta client log files.


Constructor Summary
TerracottaLogger(String name)
          Creates a TerracottaLogger implementation whose name ends with the given string.
 
Method Summary
 void debug(Object message)
          Log a message at the debug level.
 void debug(Object message, Throwable t)
          Log a message at the debug level, including the passed Throwable in the message
 void error(Object message)
          Log a message at the error level.
 void error(Object message, Throwable t)
          Log a message at the error level, including the passed Throwable in the message
 void fatal(Object message)
          Log a message at the fatal level.
 void fatal(Object message, Throwable t)
          Log a message at the fatal level, including the passed Throwable in the message
 String getName()
          Returns the name of this logger.
 void info(Object message)
          Log a message at the info level.
 void info(Object message, Throwable t)
          Log a message at the info level, including the passed Throwable in the message
 boolean isDebugEnabled()
          Returns true if debug level messages from this logger will be recorded.
 boolean isInfoEnabled()
          Returns true if info level messages from this logger will be recorded.
 void warn(Object message)
          Log a message at the warn level.
 void warn(Object message, Throwable t)
          Log a message at the warn level, including the passed Throwable in the message
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TerracottaLogger

public TerracottaLogger(String name)
Creates a TerracottaLogger implementation whose name ends with the given string.

The supplied name is prefixed with a fixed value to ensure toolkit loggers are confined within a namespace.

Parameters:
name - logger identifier
Throws:
NullPointerException - if the supplied name is null
Method Detail

debug

public void debug(Object message,
                  Throwable t)
Description copied from interface: ClusterLogger
Log a message at the debug level, including the passed Throwable in the message

Specified by:
debug in interface ClusterLogger
Parameters:
message - message to log
t - associated throwable

debug

public void debug(Object message)
Description copied from interface: ClusterLogger
Log a message at the debug level.

Specified by:
debug in interface ClusterLogger
Parameters:
message - message to log

error

public void error(Object message,
                  Throwable t)
Description copied from interface: ClusterLogger
Log a message at the error level, including the passed Throwable in the message

Specified by:
error in interface ClusterLogger
Parameters:
message - message to log
t - associated throwable

error

public void error(Object message)
Description copied from interface: ClusterLogger
Log a message at the error level.

Specified by:
error in interface ClusterLogger
Parameters:
message - message to log

fatal

public void fatal(Object message,
                  Throwable t)
Description copied from interface: ClusterLogger
Log a message at the fatal level, including the passed Throwable in the message

Specified by:
fatal in interface ClusterLogger
Parameters:
message - message to log
t - associated throwable

fatal

public void fatal(Object message)
Description copied from interface: ClusterLogger
Log a message at the fatal level.

Specified by:
fatal in interface ClusterLogger
Parameters:
message - message to log

getName

public String getName()
Description copied from interface: ClusterLogger
Returns the name of this logger.

Specified by:
getName in interface ClusterLogger
Returns:
name of this logger

info

public void info(Object message,
                 Throwable t)
Description copied from interface: ClusterLogger
Log a message at the info level, including the passed Throwable in the message

Specified by:
info in interface ClusterLogger
Parameters:
message - message to log
t - associated throwable

info

public void info(Object message)
Description copied from interface: ClusterLogger
Log a message at the info level.

Specified by:
info in interface ClusterLogger
Parameters:
message - message to log

isDebugEnabled

public boolean isDebugEnabled()
Description copied from interface: ClusterLogger
Returns true if debug level messages from this logger will be recorded.

Specified by:
isDebugEnabled in interface ClusterLogger
Returns:
true if debug logging is enabled

isInfoEnabled

public boolean isInfoEnabled()
Description copied from interface: ClusterLogger
Returns true if info level messages from this logger will be recorded.

Specified by:
isInfoEnabled in interface ClusterLogger
Returns:
true if info logging is enabled

warn

public void warn(Object message,
                 Throwable t)
Description copied from interface: ClusterLogger
Log a message at the warn level, including the passed Throwable in the message

Specified by:
warn in interface ClusterLogger
Parameters:
message - message to log
t - associated throwable

warn

public void warn(Object message)
Description copied from interface: ClusterLogger
Log a message at the warn level.

Specified by:
warn in interface ClusterLogger
Parameters:
message - message to log


Copyright © 2015 Terracotta, Inc.. All Rights Reserved.