|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.resilientedge.util.logger.Logger | +--com.resilientedge.util.logger.SimpleLogger
Concrete implementation of a general purpose Logger.
The SimpleLogger, by default, is configured with a ConsoleHander (configured with a Console Formatter). The SimpleLogger does not have a Filter, and therefore log messages of any level should be logged by the SimpleLogger.
Fields inherited from class com.resilientedge.util.logger.Logger |
LOG_FILTER, LOG_HANDLERS, MAX_POOL_SIZE, MIN_POOL_SIZE |
Constructor Summary | |
SimpleLogger()
Loggers may be Singletons. |
Method Summary | |
protected LogRecord |
createLogRecord()
This method returns a LogRecord matching the logger |
void |
localizeMessage(LogRecord logRecord)
This method performs a message lookup, for situations where user is logging by key. |
void |
log(java.lang.String rawMessage)
This method is for free form trace-logging where the level is assumed to be Trace and the message text does not represent a lookup key. |
void |
log(java.lang.String rawMessage,
int level)
This method is for free form logging where a level and the logging message are supplied. |
void |
log(java.lang.String key,
java.lang.Object[] insertValues)
This method is used to trace-log by key. |
void |
log(java.lang.String key,
java.lang.Object[] insertValues,
int level)
This method is used to log by key and level. |
void |
log(java.lang.String key,
java.lang.Object[] insertValues,
java.lang.Throwable exception)
Trace-log by key. |
void |
log(java.lang.String key,
java.lang.Object[] insertValues,
java.lang.Throwable exception,
int level)
Log by key and level. |
void |
log(java.lang.String topic,
java.lang.String rawMessage,
int level)
This method is for free form logging where a level and topic are provided in addition to the logging message. |
void |
log(java.lang.String topic,
java.lang.String key,
java.lang.Object[] insertValues,
int level)
This method is used to log by lookup key. |
void |
log(java.lang.String topic,
java.lang.String key,
java.lang.Object[] insertValues,
java.lang.Throwable exception,
int level)
Log a message by lookup key. |
void |
log(java.lang.String topic,
java.lang.String rawMessage,
java.lang.Throwable exception,
int level)
Log a message, level, topic and exception. |
void |
log(java.lang.String rawMessage,
java.lang.Throwable exception)
Log a message and exception. |
void |
log(java.lang.String rawMessage,
java.lang.Throwable exception,
int level)
Log a message, exception and level. |
void |
log(java.lang.Throwable exception,
int level)
Log an exception with a level but without a message. |
java.lang.String |
lookupConfig(java.lang.String key)
the implementation of this method returns the configuraton String value in the object's properties for the supplied key. |
Methods inherited from class com.resilientedge.util.logger.Logger |
addHandler, getFilter, getHandlers, getInstance, getWorkerPool, init, isAsync, isEnabled, removeHandler, setAsync, setDefault, setEnabled, setFilter |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public SimpleLogger()
Method Detail |
public void log(java.lang.String rawMessage)
log
in class Logger
rawMessage
- the log message text or a log message key.public void log(java.lang.String rawMessage, int level)
log
in class Logger
rawMessage
- the log message text or a log message key.level
- the Level of importance or urgencypublic void log(java.lang.String topic, java.lang.String rawMessage, int level)
log
in class Logger
topic
- the topic to which the message pertainsrawMessage
- the log message text or a log message key.level
- the level of importance or urgency.public void log(java.lang.String topic, java.lang.String key, java.lang.Object[] insertValues, int level)
log
in class Logger
topic
- the topic to which the message pertainskey
- the log message's key (as stored in resource bundle)insertValues
- the array of objects used for substitution values.level
- the level of importance or urgency.public void log(java.lang.String key, java.lang.Object[] insertValues)
log
in class Logger
key
- the log message's key (as stored in resource bundle)insertValues
- the array of objects used for substitution values.public void log(java.lang.String key, java.lang.Object[] insertValues, int level)
log
in class Logger
key
- the log message's key (as stored in resource bundle)insertValues
- the array of objects used for substitution values.level
- the level of importance or urgency.public void log(java.lang.Throwable exception, int level)
log
in class Logger
exception
- the exception whose stack-trace should be logged.level
- the level of importance or urgency.public void log(java.lang.String rawMessage, java.lang.Throwable exception)
log
in class Logger
rawMessage
- the log message text or a log message key.exception
- the exception whose stack-trace should be logged.public void log(java.lang.String rawMessage, java.lang.Throwable exception, int level)
log
in class Logger
rawMessage
- the log message text or a log message key.exception
- the exception whose stack-trace should be logged.level
- the level of importance or urgency.public void log(java.lang.String topic, java.lang.String rawMessage, java.lang.Throwable exception, int level)
log
in class Logger
topic
- the topic to which the message pertainsrawMessage
- the log message text or a log message key.exception
- the exception whose stack-trace should be logged.level
- the level of importance or urgency.public void log(java.lang.String topic, java.lang.String key, java.lang.Object[] insertValues, java.lang.Throwable exception, int level)
log
in class Logger
topic
- the topic to which the message pertainskey
- the log message's key (as stored in resource bundle)insertValues
- the array of objects used for substitution values.exception
- the exception whose stack-trace should be logged.level
- the level of importance or urgency.public void log(java.lang.String key, java.lang.Object[] insertValues, java.lang.Throwable exception)
log
in class Logger
key
- the log message's key (as stored in resource bundle)insertValues
- the array of objects used for substitution values.exception
- the exception whose stack-trace should be logged.public void log(java.lang.String key, java.lang.Object[] insertValues, java.lang.Throwable exception, int level)
log
in class Logger
key
- the log message's key (as stored in resource bundle)insertValues
- the array of objects used for substitution values.exception
- the exception whose stack-trace should be logged.level
- the level of importance or urgency.public void localizeMessage(LogRecord logRecord)
logRecord
- the log record containg the log message to localize.public java.lang.String lookupConfig(java.lang.String key)
key
- the log message's key (as stored in resource bundle)protected LogRecord createLogRecord()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |