|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
@Role public interface LoggerManager
Provide some logging management APIs such as the ability to redirect logs to an EventListener.
| Method Summary | |
|---|---|
LogLevel |
getLoggerLevel(String loggerName)
|
Collection<org.slf4j.Logger> |
getLoggers()
|
EventListener |
popLogListener()
Remove the current listener from the current thread stack. |
void |
pushLogListener(EventListener listener)
Grab subsequent logs produced by the current thread and send them to the provided listener. |
void |
setLoggerLevel(String loggerName,
LogLevel level)
Associate the passed logger to the passed log level. |
| Method Detail |
|---|
void pushLogListener(EventListener listener)
Note that the logs generated by the current thread will not be output anymore by the logging system implementing the SLF4J API (Technically, this is done, for example when the implementation is LogBack, by dynamically replacing the LogBack appender with our own).
After this method is called, logs will be only be received as XWiki events sent to the provided listener. In
addition, it also overrides any previous call to pushLogListener(EventListener) (which will get active
again after a call to popLogListener()).
listener - the listener that will receive all future logging eventsEventListener popLogListener()
If several listeners have been pushed it makes the previous one active again.
void setLoggerLevel(String loggerName,
LogLevel level)
loggerName - the loggerlevel - the level of the loggerLogLevel getLoggerLevel(String loggerName)
loggerName - the logger
Collection<org.slf4j.Logger> getLoggers()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||