|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.ow2.petals.microkernel.api.util.LoggingUtil
public class LoggingUtil
Monolog logger implementation.
This class is used to format various logs. it can be used as a static class or as a wrapper object of a logger. The methods add to the resulting message a "ClassName-MethodName" information. (only for DEBUG and INFO level)
TODO : Rename to MonologLogger and move to kernel implementation
Field Summary | |
---|---|
protected Logger |
log
|
protected String |
name
|
Constructor Summary | |
---|---|
LoggingUtil(Logger logger)
Creates a new instance of LoggingUtil |
|
LoggingUtil(Logger logger,
String loggerName)
Creates a new instance of LoggingUtil |
Method Summary | |
---|---|
void |
call()
if log is enabled, Log as DEBUG : -CALL - |
void |
call(Object msg)
if log is enabled, Log as DEBUG : -CALL - |
void |
debug(Object message)
if log is enabled, Log as DEBUG the message |
void |
end()
if log is enabled, Log as DEBUG : - END - |
void |
end(Object msg)
if log is enabled, Log as DEBUG the message : - END -msg |
void |
error(Object message)
if log is enabled, Log as ERROR the message |
void |
error(Object message,
Throwable throwable)
if log is enabled, Log as ERROR the exception |
Logger |
getLogger()
Allow to return the logger implementation wrapped by LoggingUtil |
String |
getName()
|
void |
info(Object message)
if log is enabled, Log as INFO the message |
void |
info(Object message,
Throwable error)
if log is enabled, Log as INFO the message and error |
boolean |
isDebugEnabled()
|
boolean |
isErrorEnabled()
|
boolean |
isInfoEnabled()
|
boolean |
isWarnEnabled()
|
void |
start()
if log is enabled, Log as DEBUG : -START- |
void |
start(Object msg)
if log is enabled, Log as DEBUG the message : -START-msg |
void |
warning(Object message)
if log is enabled, Log as warning the message |
void |
warning(Object message,
Throwable throwable)
if log is enabled, Log as warning the exception |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Logger log
protected String name
Constructor Detail |
---|
public LoggingUtil(Logger logger)
logger
- public LoggingUtil(Logger logger, String loggerName)
logger
- loggerName
- Method Detail |
---|
public void call()
call
in interface Logger
public void call(Object msg)
call
in interface Logger
public void start()
start
in interface Logger
public void start(Object msg)
start
in interface Logger
public void end()
end
in interface Logger
public void end(Object msg)
end
in interface Logger
public void debug(Object message)
debug
in interface Logger
public void info(Object message)
info
in interface Logger
public void info(Object message, Throwable error)
info
in interface Logger
public void warning(Object message)
warning
in interface Logger
public void warning(Object message, Throwable throwable)
warning
in interface Logger
public void error(Object message)
error
in interface Logger
public void error(Object message, Throwable throwable)
error
in interface Logger
public boolean isDebugEnabled()
isDebugEnabled
in interface Logger
public boolean isInfoEnabled()
isInfoEnabled
in interface Logger
public boolean isWarnEnabled()
isWarnEnabled
in interface Logger
public boolean isErrorEnabled()
isErrorEnabled
in interface Logger
public String getName()
getName
in interface Logger
public Logger getLogger()
Logger
getLogger
in interface Logger
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |