|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jboss.logging.Logger
org.jboss.logging.DynamicLogger
public class DynamicLogger
An extension of the JBoss Logger that adds a log() primitive that maps to a dynamically defined log level. TODO - Make sure serialization works correctly
| Field Summary | |
|---|---|
static int |
LOG_LEVEL_DEBUG
|
static int |
LOG_LEVEL_ERROR
|
static int |
LOG_LEVEL_FATAL
|
static int |
LOG_LEVEL_INFO
|
static int |
LOG_LEVEL_NONE
The available log levels |
static String[] |
LOG_LEVEL_STRINGS
The available log level strings |
static int |
LOG_LEVEL_TRACE
|
static int |
LOG_LEVEL_WARN
|
| Fields inherited from class org.jboss.logging.Logger |
|---|
LOG4J_PLUGIN_CLASS_NAME, loggerDelegate, PLUGIN_CLASS_PROP, pluginClass, pluginClassName |
| Constructor Summary | |
|---|---|
protected |
DynamicLogger(String name)
Protected CTOR |
| Method Summary | |
|---|---|
static DynamicLogger |
getDynamicLogger(Class clazz)
Create a DynamicLogger instance given the logger class. |
static DynamicLogger |
getDynamicLogger(Class clazz,
String suffix)
Create a DynamicLogger instance given the logger class with the given suffix. |
static DynamicLogger |
getDynamicLogger(String name)
Create a DynamicLogger instance given the logger name. |
static DynamicLogger |
getDynamicLogger(String name,
String suffix)
Create a DynamicLogger instance given the logger name with the given suffix. |
int |
getLogLevel()
Gets the logLevel of the log() primitive |
String |
getLogLevelAsString()
Gets the logLevel of the log() primitive in String form |
void |
log(Object message)
Logs a message using dynamic log level |
void |
log(Object message,
Throwable t)
Logs a message and a throwable using dynamic log level |
void |
setLogLevel(int logLevel)
Sets the logLevel for the log() primitive |
void |
setLogLevelAsString(String logLevelString)
Sets the logLevel of the log() primitive |
| Methods inherited from class org.jboss.logging.Logger |
|---|
debug, debug, error, error, fatal, fatal, getDelegatePlugin, getLogger, getLogger, getLogger, getLogger, getLoggerPlugin, getName, getPluginClassName, info, info, init, isDebugEnabled, isInfoEnabled, isTraceEnabled, setPluginClassName, trace, trace, warn, warn |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int LOG_LEVEL_NONE
public static final int LOG_LEVEL_FATAL
public static final int LOG_LEVEL_ERROR
public static final int LOG_LEVEL_WARN
public static final int LOG_LEVEL_INFO
public static final int LOG_LEVEL_DEBUG
public static final int LOG_LEVEL_TRACE
public static final String[] LOG_LEVEL_STRINGS
| Constructor Detail |
|---|
protected DynamicLogger(String name)
| Method Detail |
|---|
public static DynamicLogger getDynamicLogger(String name)
name - the logger name
public static DynamicLogger getDynamicLogger(String name,
String suffix)
This will include a logger seperator between classname and suffix
name - The logger namesuffix - A suffix to append to the classname.public static DynamicLogger getDynamicLogger(Class clazz)
clazz - the Class whose name will be used as the logger name
public static DynamicLogger getDynamicLogger(Class clazz,
String suffix)
This will include a logger seperator between classname and suffix
clazz - The Class whose name will be used as the logger name.suffix - A suffix to append to the classname.public void setLogLevel(int logLevel)
logLevel - between LOG_LEVEL_NONE and LOG_LEVEL_TRACEpublic int getLogLevel()
public void setLogLevelAsString(String logLevelString)
logLevelString - the log level in String formpublic String getLogLevelAsString()
public void log(Object message)
message - the message to log
public void log(Object message,
Throwable t)
message - the message to logt - the throwable to log
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||