public class Log4jArchiver extends Object implements LogArchiver
MAX_HISTORY, NO_LOG_AVAILABLE
Constructor and Description |
---|
Log4jArchiver(Object root,
String pattern) |
Modifier and Type | Method and Description |
---|---|
void |
addLogListener(LogListener l,
Object component,
LogLevel level,
long last,
int history)
Add a listener to the archiver which will receive all missed
events.
|
static LogLevel |
convertLevel(org.apache.log4j.Level level)
Utility function to convert Log4j log level.
|
boolean |
hasArchive(String archive) |
void |
onDestroy() |
void |
removeLogListener(LogListener l,
Object component)
Remove the LogListener.
|
public boolean hasArchive(String archive)
public void addLogListener(LogListener l, Object component, LogLevel level, long last, int history)
LogArchiver
Event numbers begin at 0. To receive all events, last must be -1.
addLogListener
in interface LogArchiver
l
- The logListener which will receive the events.level
- The level of events required.last
- The last event number received. The LogArchive will
not send messages from before this number.history
- The maximum messages to send up to the most recent.public void removeLogListener(LogListener l, Object component)
LogArchiver
removeLogListener
in interface LogArchiver
l
- The LogListener.public void onDestroy()
public static LogLevel convertLevel(org.apache.log4j.Level level)
level
- The log4j level.