public class LogMonitorHandler
extends java.util.logging.Handler
logsurfer
this class processes log records and tries to find
certain patterns based on regular expressions. If a specific log record is found the handlers
then calls the low-level handlers by throwing an event to registered listeners. These objects
can then decide whether to take appropriate steps like sending a message to the support team,
or to popup a dialog window to inform the user about the current situation.
Since the original logsurfer
turned out to be hardly configurable, this class
allows for much easier configuration. In the simplest case you can set a simple rule that
reacts on a single log entry (line).
Constructor and Description |
---|
LogMonitorHandler()
Constructor method for i18n purposes only.
|
LogMonitorHandler(LogMonitor monitor)
Constructor method for the log monitor.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Close the
Handler and free all associated resources. |
void |
flush()
Flush any buffered output.
|
void |
publish(java.util.logging.LogRecord record)
Analyzes the incoming log messages for special patterns and implements the monitoring.
|
public LogMonitorHandler() throws java.lang.InstantiationException
I18NExtractor
).
java.lang.InstantiationException
- Error indicationpublic LogMonitorHandler(LogMonitor monitor)
monitor
- The instance doing the log monitoringpublic void publish(java.util.logging.LogRecord record)
publish
in class java.util.logging.Handler
record
- Log message to be monitored.public void close()
Handler
and free all associated resources.
close
in class java.util.logging.Handler
public void flush()
flush
in class java.util.logging.Handler
Copyright © 2005-2013 Leisenfels UG (haftungsbeschränkt). All rights reserved.