|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.slide.util.logger.SimpleLogger
Simple logger implementation.
| Field Summary | |
protected java.text.SimpleDateFormat |
dateFormat
Date / Time format. |
protected int |
loggerLevel
Logging level of the logger. |
protected java.lang.String[] |
loggingLevels
Text values for logging priorities. |
| Fields inherited from interface org.apache.slide.util.logger.Logger |
CRITICAL, DEBUG, DEFAULT_CHANNEL, EMERGENCY, ERROR, INFO, WARNING |
| Constructor Summary | |
SimpleLogger()
|
|
| Method Summary | |
int |
getLoggerLevel()
Logger level getter. |
int |
getLoggerLevel(java.lang.String channel)
Logger level getter. |
boolean |
isEnabled(int level)
Check if the default channel with the specified level is enabled for logging. |
boolean |
isEnabled(java.lang.String channel,
int level)
Check if the channel with the specified level is enabled for logging. |
void |
log(java.lang.Object data)
Log an object. |
void |
log(java.lang.Object data,
int level)
Log an object with the specified level. |
void |
log(java.lang.Object data,
java.lang.String channel,
int level)
Log an object thru the specified channel and with the specified level. |
void |
log(java.lang.Object data,
java.lang.Throwable throwable,
java.lang.String channel,
int level)
Log an object and an associated throwable thru the specified channel and with the specified level. |
void |
setDateFormat(java.lang.String pattern)
Date format setter. |
void |
setLoggerLevel(int loggerLevel)
Logger level setter. |
void |
setLoggerLevel(java.lang.String channel,
int loggerLevel)
Logger level setter. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected int loggerLevel
protected java.text.SimpleDateFormat dateFormat
protected java.lang.String[] loggingLevels
| Constructor Detail |
public SimpleLogger()
| Method Detail |
public void setLoggerLevel(java.lang.String channel,
int loggerLevel)
setLoggerLevel in interface LoggerloggerLevel - New logger levelchannel - The channel for which the level is set.public void setLoggerLevel(int loggerLevel)
setLoggerLevel in interface LoggerloggerLevel - New logger levelpublic int getLoggerLevel()
getLoggerLevel in interface Loggerpublic int getLoggerLevel(java.lang.String channel)
getLoggerLevel in interface Loggerchannel - The channel whose log level is returned.
public void setDateFormat(java.lang.String pattern)
pattern - Format pattern
public void log(java.lang.Object data,
java.lang.Throwable throwable,
java.lang.String channel,
int level)
log in interface Loggerdata - object to logthrowable - throwable to be loggedchannel - channel name used for logginglevel - level used for logging
public void log(java.lang.Object data,
java.lang.String channel,
int level)
log in interface Loggerdata - The object to log.channel - The channel name used for logging.level - The level used for logging.
public void log(java.lang.Object data,
int level)
log in interface Loggerdata - The object to log.level - The level used for logging.public void log(java.lang.Object data)
log in interface Loggerdata - The object to log.
public boolean isEnabled(java.lang.String channel,
int level)
isEnabled in interface Loggerchannel - The channel specificationlevel - The level specificationpublic boolean isEnabled(int level)
isEnabled in interface Loggerlevel - The level specification
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||