public class Logger
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
cvsId
Revision control id
|
Modifier and Type | Method and Description |
---|---|
static void |
addAppender(Appender newAppender)
Add an appender to our list
|
static void |
addFileAppender(java.lang.String fileName)
Add a file-appender to our list
|
static void |
addStandardOutputAppender()
Add a standard-output appender to our list.
|
static void |
clearAppenders()
Clear all appenders
|
void |
debug(java.lang.String message)
Log a debug level message
|
void |
debug(java.lang.String message,
byte[] data)
Log a debug level message
|
void |
debug(java.lang.String message,
java.lang.Object arg)
Logs by substituting in the argument at the location marked in the message
argument by {0}.
|
void |
debug(java.lang.String message,
java.lang.Object arg0,
java.lang.Object arg1)
Logs by substituting in the arguments at the locations marked in the message
argument by {#} (where # is a number).
|
void |
debug(java.lang.String message,
java.lang.Object arg0,
java.lang.Object arg1,
java.lang.Object arg2)
Logs by substituting in the arguments at the locations marked in the message
argument by {#} (where # is a number).
|
void |
debug(java.lang.String message,
java.lang.Object arg0,
java.lang.Object arg1,
java.lang.Object arg2,
java.lang.Object arg3)
Logs by substituting in the arguments at the locations marked in the message
argument by {#} (where # is a number).
|
void |
debug(java.lang.String message,
java.lang.Object arg0,
java.lang.Object arg1,
java.lang.Object arg2,
java.lang.Object arg3,
java.lang.Object arg4)
Logs by substituting in the arguments at the locations marked in the message
argument by {#} (where # is a number).
|
void |
debug(java.lang.String message,
java.lang.Throwable t)
Log a debug level message
|
void |
error(java.lang.String message)
Log an error level message
|
void |
error(java.lang.String message,
java.lang.Throwable t)
Log an error level message
|
void |
fatal(java.lang.String message)
Log a fatal level message
|
void |
fatal(java.lang.String message,
java.lang.Throwable t)
Log a fatal level message
|
static Level |
getLevel()
Returns the logging level for all loggers.
|
static Logger |
getLogger(java.lang.Class clazz)
Get a logger for the supplied class
|
static Logger |
getLogger(java.lang.String clazz)
Get a logger for the supplied class
|
void |
info(java.lang.String message)
Log an info level message
|
void |
info(java.lang.String message,
java.lang.Throwable t)
Log an info level message
|
boolean |
isDebugEnabled()
Is logging enabled for the supplied level?
|
boolean |
isEnabledFor(Level level)
Is logging enabled for the supplied level?
|
boolean |
isInfoEnabled()
Is logging enabled for the supplied level?
|
void |
log(Level level,
java.lang.String message,
java.lang.Throwable t)
Log a message
|
void |
logThreadName(boolean logThreadName)
Set flag for logging thread names as part of the logger names for this instance
of the logger.
|
static void |
logThreadNames(boolean logThreadNames)
Set global flag for logging thread names as part of the logger names.
|
static void |
removeAppender(Appender appender)
Remove an appender to from list
|
static void |
setLevel(Level level)
Set all loggers to this level
|
static void |
shutdown()
Close all appenders
|
void |
warn(java.lang.String message)
Log a warning level message
|
void |
warn(java.lang.String message,
java.lang.Throwable t)
Log a warning level message
|
public static Level getLevel()
public static void setLevel(Level level)
level
- new levelpublic static Logger getLogger(java.lang.Class clazz)
clazz
- full class namepublic static Logger getLogger(java.lang.String clazz)
clazz
- full class namepublic static void addAppender(Appender newAppender)
newAppender
- public static void addFileAppender(java.lang.String fileName) throws java.io.IOException
fileName
- Path of file.java.io.IOException
public static void addStandardOutputAppender()
public static void removeAppender(Appender appender)
appender
- public static void clearAppenders()
public static void shutdown()
public static void logThreadNames(boolean logThreadNames)
logThreadNames
- true if logging thread names, false otherwisepublic void logThreadName(boolean logThreadName)
logThreadName
- true if logging thread names, false otherwisepublic void log(Level level, java.lang.String message, java.lang.Throwable t)
level
- log levelmessage
- message to logt
- throwable objectpublic void info(java.lang.String message)
message
- message to logpublic void info(java.lang.String message, java.lang.Throwable t)
message
- message to logt
- throwable objectpublic void warn(java.lang.String message)
message
- message to logpublic void warn(java.lang.String message, java.lang.Throwable t)
message
- message to logt
- throwable objectpublic void error(java.lang.String message)
message
- message to logpublic void error(java.lang.String message, java.lang.Throwable t)
message
- message to logt
- throwable objectpublic void fatal(java.lang.String message)
message
- message to logpublic void fatal(java.lang.String message, java.lang.Throwable t)
message
- message to logt
- throwable objectpublic void debug(java.lang.String message)
message
- message to logpublic void debug(java.lang.String message, byte[] data)
message
- message to logpublic void debug(java.lang.String message, java.lang.Object arg)
message
- Message containing "substitution marks"arg
- argument to be substituted at the marked location.public void debug(java.lang.String message, java.lang.Object arg0, java.lang.Object arg1)
message
- Message containing "substitution marks"arg0
- argument to be substituted at the marked location.arg1
- argument to be substituted at the marked location.public void debug(java.lang.String message, java.lang.Object arg0, java.lang.Object arg1, java.lang.Object arg2)
message
- Message containing "substitution marks"arg0
- argument to be substituted at the marked location.arg1
- argument to be substituted at the marked location.arg2
- argument to be substituted at the marked location.public void debug(java.lang.String message, java.lang.Object arg0, java.lang.Object arg1, java.lang.Object arg2, java.lang.Object arg3)
message
- Message containing "substitution marks"arg0
- argument to be substituted at the marked location.arg1
- argument to be substituted at the marked location.arg2
- argument to be substituted at the marked location.arg3
- argument to be substituted at the marked location.public void debug(java.lang.String message, java.lang.Object arg0, java.lang.Object arg1, java.lang.Object arg2, java.lang.Object arg3, java.lang.Object arg4)
message
- Message containing "substitution marks"arg0
- argument to be substituted at the marked location.arg1
- argument to be substituted at the marked location.arg2
- argument to be substituted at the marked location.arg3
- argument to be substituted at the marked location.arg4
- argument to be substituted at the marked location.public void debug(java.lang.String message, java.lang.Throwable t)
message
- message to logt
- throwable objectpublic boolean isEnabledFor(Level level)
level
- level to test forpublic boolean isDebugEnabled()
public boolean isInfoEnabled()
Copyright © 2001-2014 Enterprise Distributed Technologies Ltd. All Rights Reserved.