| java.lang.Object com.enterprisedt.util.debug.Logger
Logger | public class Logger (Code) | | Logger class that mimics log4j Logger class. If log4j integration
is desired, the "edtftp.log4j" property should be set to "true" and
log4j classes must be in the classpath
author: Bruce Blackshaw version: $Revision: 1.22 $ |
Method Summary | |
public static synchronized void | addAppender(Appender newAppender) | public static synchronized void | clearAppenders() | public void | debug(String message) | public void | debug(String message, byte[] data) | public void | debug(String message, Object arg) Logs by substituting in the argument at the location marked in the message
argument by {0}.
Additional MessageFormat formatting instructions may be included. | public void | debug(String message, Object arg0, Object arg1) Logs by substituting in the arguments at the locations marked in the message
argument by {#} (where # is a number). | public void | debug(String message, Object arg0, Object arg1, Object arg2) Logs by substituting in the arguments at the locations marked in the message
argument by {#} (where # is a number). | public void | debug(String message, Object arg0, Object arg1, Object arg2, Object arg3) Logs by substituting in the arguments at the locations marked in the message
argument by {#} (where # is a number). | public void | debug(String message, Object arg0, Object arg1, Object arg2, Object arg3, Object arg4) Logs by substituting in the arguments at the locations marked in the message
argument by {#} (where # is a number). | public void | debug(String message, Throwable t) | public void | error(String message) | public void | error(String message, Throwable t) | public void | fatal(String message) | public void | fatal(String message, Throwable t) | public static synchronized Level | getLevel() Returns the logging level for all loggers. | public static Logger | getLogger(Class clazz) | public static synchronized Logger | getLogger(String clazz) | public void | info(String message) | public void | info(String message, Throwable t) | public boolean | isDebugEnabled() | public synchronized boolean | isEnabledFor(Level level) | public boolean | isInfoEnabled() | public synchronized void | log(Level level, String message, Throwable t) | public synchronized void | logThreadName(boolean logThreadName) Set flag for logging thread names as part of the logger names for this instance
of the logger. | public static synchronized void | logThreadNames(boolean logThreadNames) Set global flag for logging thread names as part of the logger names. | public static synchronized void | removeAppender(Appender appender) | public static synchronized void | setLevel(Level level) | public static synchronized void | shutdown() | public void | warn(String message) | public void | warn(String message, Throwable t) |
addAppender | public static synchronized void addAppender(Appender newAppender)(Code) | | Add an appender to our list
Parameters: newAppender - |
clearAppenders | public static synchronized void clearAppenders()(Code) | | Clear all appenders
|
debug | public void debug(String message)(Code) | | Log a debug level message
Parameters: message - message to log |
debug | public void debug(String message, byte[] data)(Code) | | Log a debug level message
Parameters: message - message to log |
debug | public void debug(String message, Object arg)(Code) | | Logs by substituting in the argument at the location marked in the message
argument by {0}.
Additional MessageFormat formatting instructions may be included. Note that
this method saves processing time by not building the complete string unless
it is necessary; this saves the need for encapsulating
many complete logging statements in an "if (log.isDebugEnabled())" block.
Parameters: message - Message containing "substitution marks" Parameters: arg - argument to be substituted at the marked location. |
debug | public void debug(String message, Object arg0, Object arg1)(Code) | | Logs by substituting in the arguments at the locations marked in the message
argument by {#} (where # is a number).
Additional MessageFormat formatting instructions may be included.Note that
this method saves processing time by not building the complete string unless
it is necessary; this saves the need for encapsulating
many complete logging statements in an "if (log.isDebugEnabled())" block.
Parameters: message - Message containing "substition marks" Parameters: arg0 - argument to be substituted at the marked location. Parameters: arg1 - argument to be substituted at the marked location. |
debug | public void debug(String message, Object arg0, Object arg1, Object arg2)(Code) | | Logs by substituting in the arguments at the locations marked in the message
argument by {#} (where # is a number).
Additional MessageFormat formatting instructions may be included.Note that
this method saves processing time by not building the complete string unless
it is necessary; this saves the need for encapsulating
many complete logging statements in an "if (log.isDebugEnabled())" block.
Parameters: message - Message containing "substition marks" Parameters: arg0 - argument to be substituted at the marked location. Parameters: arg1 - argument to be substituted at the marked location. Parameters: arg2 - argument to be substituted at the marked location. |
debug | public void debug(String message, Object arg0, Object arg1, Object arg2, Object arg3)(Code) | | Logs by substituting in the arguments at the locations marked in the message
argument by {#} (where # is a number).
Additional MessageFormat formatting instructions may be included.Note that
this method saves processing time by not building the complete string unless
it is necessary; this saves the need for encapsulating
many complete logging statements in an "if (log.isDebugEnabled())" block.
Parameters: message - Message containing "substition marks" Parameters: arg0 - argument to be substituted at the marked location. Parameters: arg1 - argument to be substituted at the marked location. Parameters: arg2 - argument to be substituted at the marked location. Parameters: arg3 - argument to be substituted at the marked location. |
debug | public void debug(String message, Object arg0, Object arg1, Object arg2, Object arg3, Object arg4)(Code) | | Logs by substituting in the arguments at the locations marked in the message
argument by {#} (where # is a number).
Additional MessageFormat formatting instructions may be included.Note that
this method saves processing time by not building the complete string unless
it is necessary; this saves the need for encapsulating
many complete logging statements in an "if (log.isDebugEnabled())" block.
Parameters: message - Message containing "substition marks" Parameters: arg0 - argument to be substituted at the marked location. Parameters: arg1 - argument to be substituted at the marked location. Parameters: arg2 - argument to be substituted at the marked location. Parameters: arg3 - argument to be substituted at the marked location. Parameters: arg4 - argument to be substituted at the marked location. |
debug | public void debug(String message, Throwable t)(Code) | | Log a debug level message
Parameters: message - message to log Parameters: t - throwable object |
error | public void error(String message)(Code) | | Log an error level message
Parameters: message - message to log |
error | public void error(String message, Throwable t)(Code) | | Log an error level message
Parameters: message - message to log Parameters: t - throwable object |
fatal | public void fatal(String message)(Code) | | Log a fatal level message
Parameters: message - message to log |
fatal | public void fatal(String message, Throwable t)(Code) | | Log a fatal level message
Parameters: message - message to log Parameters: t - throwable object |
getLevel | public static synchronized Level getLevel()(Code) | | Returns the logging level for all loggers.
current logging level. |
getLogger | public static Logger getLogger(Class clazz)(Code) | | Get a logger for the supplied class
Parameters: clazz - full class name logger for class |
getLogger | public static synchronized Logger getLogger(String clazz)(Code) | | Get a logger for the supplied class
Parameters: clazz - full class name logger for class |
info | public void info(String message)(Code) | | Log an info level message
Parameters: message - message to log |
info | public void info(String message, Throwable t)(Code) | | Log an info level message
Parameters: message - message to log Parameters: t - throwable object |
isDebugEnabled | public boolean isDebugEnabled()(Code) | | Is logging enabled for the supplied level?
true if enabled |
isEnabledFor | public synchronized boolean isEnabledFor(Level level)(Code) | | Is logging enabled for the supplied level?
Parameters: level - level to test for true if enabled |
isInfoEnabled | public boolean isInfoEnabled()(Code) | | Is logging enabled for the supplied level?
true if enabled |
log | public synchronized void log(Level level, String message, Throwable t)(Code) | | Log a message
Parameters: level - log level Parameters: message - message to log Parameters: t - throwable object |
logThreadName | public synchronized void logThreadName(boolean logThreadName)(Code) | | Set flag for logging thread names as part of the logger names for this instance
of the logger.
Parameters: logThreadName - true if logging thread names, false otherwise |
logThreadNames | public static synchronized void logThreadNames(boolean logThreadNames)(Code) | | Set global flag for logging thread names as part of the logger names.
Parameters: logThreadNames - true if logging thread names, false otherwise |
removeAppender | public static synchronized void removeAppender(Appender appender)(Code) | | Remove an appender to from list
Parameters: appender - |
setLevel | public static synchronized void setLevel(Level level)(Code) | | Set all loggers to this level
Parameters: level - new level |
shutdown | public static synchronized void shutdown()(Code) | | Close all appenders
|
warn | public void warn(String message)(Code) | | Log a warning level message
Parameters: message - message to log |
warn | public void warn(String message, Throwable t)(Code) | | Log a warning level message
Parameters: message - message to log Parameters: t - throwable object |
|
|