|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.slf4j.helpers.MarkerIgnoringBase org.norther.tammi.acorn.logger.log.DefaultLog
public class DefaultLog
A default implementation of Log writing messages to System.out and System.err.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.norther.tammi.acorn.logger.log.Log |
---|
Log.Level |
Field Summary | |
---|---|
protected String |
name
|
Fields inherited from interface org.norther.tammi.acorn.logger.log.Log |
---|
INTERNAL_ERROR |
Fields inherited from interface org.slf4j.Logger |
---|
ROOT_LOGGER_NAME |
Constructor Summary | |
---|---|
DefaultLog()
Constructs a new log. |
|
DefaultLog(String n)
Constructs a new log for a named logger. |
Method Summary | |
---|---|
void |
access(long time,
String msg,
Object arg)
Logs an access message. |
void |
activated(LoggerEvent event)
Notifies the object that it has been activated for a logger. |
void |
debug(Object msg)
Logs a debug message. |
void |
debug(String msg)
|
void |
debug(String msg,
Object arg)
Logs a debug message with an argument. |
void |
debug(String msg,
Object[] args)
|
void |
debug(String msg,
Object arg1,
Object arg2)
|
void |
debug(String msg,
Throwable t)
|
void |
error(Object msg)
Logs an error message. |
void |
error(String msg)
|
void |
error(String msg,
Object arg)
Logs an error message with an argument. |
void |
error(String msg,
Object[] args)
|
void |
error(String msg,
Object arg1,
Object arg2)
|
void |
error(String msg,
Object arg,
Throwable cause)
Logs an error message with an argument and reason. |
void |
error(String msg,
Throwable t)
|
void |
fatal(Object msg)
Logs a fatal message. |
void |
fatal(String msg,
Object arg)
Logs a fatal message with an argument. |
void |
fatal(String msg,
Object arg,
Throwable cause)
Logs a fatal message with an argument and reason. |
void |
fatal(String msg,
Throwable cause)
Logs a fatal message with a reason. |
Throwable |
getCause(Throwable cause)
Gets the relevant cause of the specified throwable. |
Object |
getContext()
Gets the context of this log. |
Log.Level |
getLevel()
Gets the log level. |
protected Localizer |
getLocalizer()
Gets the localizer. |
protected LogFactory |
getLogFactory()
Gets the log factory. |
Object |
getLogger()
Gets the logger of this log. |
String |
getLoggerName()
Gets the logger name of this log. |
String |
getName()
|
void |
info(Object msg)
Logs an info message. |
void |
info(String msg)
|
void |
info(String msg,
Object arg)
Logs an info message with an argument. |
void |
info(String msg,
Object[] args)
|
void |
info(String msg,
Object arg1,
Object arg2)
|
void |
info(String msg,
Throwable t)
|
boolean |
isAccessEnabled()
Checks whether access is enabled. |
boolean |
isActive()
Checks whether this log is activated. |
boolean |
isDebugEnabled()
Checks whether debug is enabled. |
boolean |
isErrorEnabled()
Checks whether error is enabled. |
boolean |
isFatalEnabled()
Checks whether fatal is enabled. |
boolean |
isInfoEnabled()
Checks whether info is enabled. |
boolean |
isLogEnabled(Log.Level level)
Checks whether the specified level is enabled. |
boolean |
isTraceEnabled()
Checks whether trace is enabled. |
boolean |
isWarnEnabled()
Checks whether warn is enabled. |
String |
localize(Throwable target,
Object... localization)
Localizes the specified exception. |
void |
log(Log.Level level,
long time,
String msg,
Object arg)
Logs a message with a specific level, date and argument. |
void |
log(Log.Level level,
long time,
String msg,
Object arg,
Throwable cause)
Logs a message with a specific level, date, argument and reason. |
void |
log(Log.Level level,
long time,
String msg,
Throwable cause)
Logs a message with a specific level, date and reason. |
void |
log(Log.Level level,
Object msg)
Logs a message with a specific level. |
void |
log(Log.Level level,
String msg,
Object arg)
Logs a message with a specific level and argument. |
void |
log(Log.Level level,
String msg,
Object arg,
Throwable cause)
Logs a message with a specific level, argument and reason. |
void |
log(Log.Level level,
String msg,
Throwable cause)
Logs a message with a specific level and reason. |
protected Object |
readResolve()
|
void |
trace(Object msg)
Logs a trace message. |
void |
trace(String msg)
|
void |
trace(String msg,
Object arg)
Logs a trace message with an argument. |
void |
trace(String msg,
Object[] args)
|
void |
trace(String msg,
Object arg1,
Object arg2)
|
void |
trace(String msg,
Throwable t)
|
void |
warn(Object msg)
Logs a warn message. |
void |
warn(String msg)
|
void |
warn(String msg,
Object arg)
Logs a warn message with an argument. |
void |
warn(String msg,
Object[] args)
|
void |
warn(String msg,
Object arg1,
Object arg2)
|
void |
warn(String msg,
Object arg,
Throwable cause)
Logs a warn message with an argument and reason. |
void |
warn(String msg,
Throwable t)
|
Methods inherited from class org.slf4j.helpers.MarkerIgnoringBase |
---|
debug, debug, debug, debug, debug, error, error, error, error, error, info, info, info, info, info, isDebugEnabled, isErrorEnabled, isInfoEnabled, isTraceEnabled, isWarnEnabled, toString, trace, trace, trace, trace, trace, warn, warn, warn, warn, warn |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.slf4j.Logger |
---|
debug, debug, debug, debug, debug, error, error, error, error, error, getName, info, info, info, info, info, isDebugEnabled, isErrorEnabled, isInfoEnabled, isTraceEnabled, isWarnEnabled, trace, trace, trace, trace, trace, warn, warn, warn, warn, warn |
Field Detail |
---|
protected String name
Constructor Detail |
---|
public DefaultLog()
public DefaultLog(String n)
n
- the logger name.Method Detail |
---|
public boolean isTraceEnabled()
Log
isTraceEnabled
in interface Log
isTraceEnabled
in interface org.slf4j.Logger
public boolean isDebugEnabled()
Log
isDebugEnabled
in interface Log
isDebugEnabled
in interface org.slf4j.Logger
public boolean isInfoEnabled()
Log
isInfoEnabled
in interface Log
isInfoEnabled
in interface org.slf4j.Logger
public boolean isWarnEnabled()
Log
isWarnEnabled
in interface Log
isWarnEnabled
in interface org.slf4j.Logger
public boolean isErrorEnabled()
Log
isErrorEnabled
in interface Log
isErrorEnabled
in interface org.slf4j.Logger
public boolean isFatalEnabled()
Log
isFatalEnabled
in interface Log
public boolean isAccessEnabled()
Log
isAccessEnabled
in interface Log
public boolean isLogEnabled(Log.Level level)
Log
isLogEnabled
in interface Log
level
- the logging level.
public Log.Level getLevel()
Log
getLevel
in interface Log
public void trace(Object msg)
Log
trace
in interface Log
msg
- the message to log.public void trace(String msg)
trace
in interface org.slf4j.Logger
public void trace(String msg, Object arg)
Log
trace
in interface Log
trace
in interface org.slf4j.Logger
msg
- the message to log.arg
- the argument or cause.public void trace(String msg, Throwable t)
trace
in interface org.slf4j.Logger
public void trace(String msg, Object arg1, Object arg2)
trace
in interface org.slf4j.Logger
public void trace(String msg, Object[] args)
trace
in interface org.slf4j.Logger
public void debug(Object msg)
Log
debug
in interface Log
msg
- the message to log.public void debug(String msg)
debug
in interface org.slf4j.Logger
public void debug(String msg, Object arg)
Log
debug
in interface Log
debug
in interface org.slf4j.Logger
msg
- the message to log.arg
- the argument or cause.public void debug(String msg, Throwable t)
debug
in interface org.slf4j.Logger
public void debug(String msg, Object arg1, Object arg2)
debug
in interface org.slf4j.Logger
public void debug(String msg, Object[] args)
debug
in interface org.slf4j.Logger
public void info(Object msg)
Log
info
in interface Log
msg
- the message to log.public void info(String msg)
info
in interface org.slf4j.Logger
public void info(String msg, Object arg)
Log
info
in interface Log
info
in interface org.slf4j.Logger
msg
- the message to log.arg
- the argument or cause.public void info(String msg, Throwable t)
info
in interface org.slf4j.Logger
public void info(String msg, Object arg1, Object arg2)
info
in interface org.slf4j.Logger
public void info(String msg, Object[] args)
info
in interface org.slf4j.Logger
public void warn(Object msg)
Log
warn
in interface Log
msg
- the message to log.public void warn(String msg)
warn
in interface org.slf4j.Logger
public void warn(String msg, Object arg)
Log
warn
in interface Log
warn
in interface org.slf4j.Logger
msg
- the message to log.arg
- the argument or cause.public void warn(String msg, Object arg, Throwable cause)
Log
warn
in interface Log
msg
- the message to log.arg
- the argument.cause
- the cause.public void warn(String msg, Throwable t)
warn
in interface org.slf4j.Logger
public void warn(String msg, Object arg1, Object arg2)
warn
in interface org.slf4j.Logger
public void warn(String msg, Object[] args)
warn
in interface org.slf4j.Logger
public void error(Object msg)
Log
error
in interface Log
msg
- the message to log.public void error(String msg)
error
in interface org.slf4j.Logger
public void error(String msg, Object arg)
Log
error
in interface Log
error
in interface org.slf4j.Logger
msg
- the message to log.arg
- the argument or cause.public void error(String msg, Object arg, Throwable cause)
Log
error
in interface Log
msg
- the message to log.arg
- the argument.cause
- the cause.public void error(String msg, Throwable t)
error
in interface org.slf4j.Logger
public void error(String msg, Object arg1, Object arg2)
error
in interface org.slf4j.Logger
public void error(String msg, Object[] args)
error
in interface org.slf4j.Logger
public void fatal(Object msg)
Log
fatal
in interface Log
msg
- the message to log.public void fatal(String msg, Object arg)
Log
fatal
in interface Log
msg
- the message to log.arg
- the argument or cause.public void fatal(String msg, Throwable cause)
Log
fatal
in interface Log
msg
- the message to log.cause
- the cause.public void fatal(String msg, Object arg, Throwable cause)
Log
fatal
in interface Log
msg
- the message to log.arg
- the argument.cause
- the cause.public void access(long time, String msg, Object arg)
Log
access
in interface Log
time
- the time of the event.msg
- the message to log.arg
- the argument.public void log(Log.Level level, Object msg)
Log
log
in interface Log
level
- the level of the message.msg
- the message to log.public void log(Log.Level level, String msg, Object arg)
Log
log
in interface Log
level
- the level of the message.msg
- the message to log.arg
- the argument or cause.public void log(Log.Level level, String msg, Throwable cause)
Log
log
in interface Log
level
- the level of the message.msg
- the message to log.cause
- the cause.public void log(Log.Level level, String msg, Object arg, Throwable cause)
Log
log
in interface Log
level
- the level of the message.msg
- the message to log.arg
- the argument.cause
- the cause.public void log(Log.Level level, long time, String msg, Object arg)
Log
log
in interface Log
level
- the level of the message.time
- the time of the event.msg
- the message to log.arg
- the argument or cause.public void log(Log.Level level, long time, String msg, Throwable cause)
Log
log
in interface Log
level
- the level of the message.time
- the time of the event.msg
- the message to log.cause
- the cause.public void log(Log.Level level, long time, String msg, Object arg, Throwable cause)
Log
log
in interface Log
level
- the level of the message.time
- the time of the event.msg
- the message to log.arg
- the argument.cause
- the cause.public String localize(Throwable target, Object... localization)
Log
The message is constructed by using the exception type and non-localized message as a key for the localized message. If such a message can't be found, the plain exception type is used as the key. If such a message is found and it ends with a colon, the non-localized message is appended to it. If such a message is not found, the non-localized message is returned unmodified.
localize
in interface Log
target
- the exception.localization
- the localization.
public String getLoggerName()
Log
getLoggerName
in interface Log
public Object getLogger()
Log
getLogger
in interface Log
public Object getContext()
Log
getContext
in interface Log
public Throwable getCause(Throwable cause)
Log
getCause
in interface Log
cause
- the cause throwable.
public boolean isActive()
Log
isActive
in interface Log
public void activated(LoggerEvent event)
LoggerListener
activated
in interface LoggerListener
event
- the logger event.protected LogFactory getLogFactory()
protected Localizer getLocalizer()
public String getName()
getName
in interface org.slf4j.Logger
protected Object readResolve() throws ObjectStreamException
ObjectStreamException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |