Class LogEventListener
java.lang.Object
com.netscape.certsrv.logging.LogEventListener
- All Implemented Interfaces:
EventListener
- Direct Known Subclasses:
LogFile
A class representing a log event listener.
A LogEventListener is registered to a specific
ILogQueue to be notified of created ILogEvents.
the log queue will notify all its registered listeners
of the logged event. The listener will then proceed to
process the event accordingly which will result in a log
message existing in some file.
- Version:
- $Revision$, $Date$
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract voidflush()Flushes the log buffers (if any).abstract ConfigStoreGet the configuration store for the log event listener.Return list of default config parameters for this log event listener.abstract StringReturns the description of this log event listener.abstract StringReturns implementation name.Return list of instance config parameters for this log event listener.abstract voidinit(Subsystem owner, LoggerConfig config) Initialize this log listenerabstract voidThe event notification method: Logs event.abstract NameValuePairsRetrieve last "maxLine" number of system logs with log level > "level" and from source "source".abstract NameValuePairsretrieveLogList(Hashtable<String, String> req) Retrieve list of log files.voidsetCMSEngine(CMSEngine engine) abstract voidshutdown()Closes the log file and destroys any associated threads.abstract voidstartup()Startup the instance.
-
Field Details
-
engine
-
-
Constructor Details
-
LogEventListener
public LogEventListener()
-
-
Method Details
-
getCMSEngine
-
setCMSEngine
-
log
The event notification method: Logs event.- Parameters:
event- The log event to be processed.- Throws:
ELogException
-
flush
public abstract void flush()Flushes the log buffers (if any). Will result in the messages being actually written to their destination. -
shutdown
public abstract void shutdown()Closes the log file and destroys any associated threads. -
getConfigStore
Get the configuration store for the log event listener.- Returns:
- The configuration store of this log event listener.
-
init
Initialize this log listener- Parameters:
owner- The subsystem.config- Configuration store for this log listener.
-
startup
-
retrieveLogContent
public abstract NameValuePairs retrieveLogContent(Hashtable<String, String> req) throws jakarta.servlet.ServletException, IOException, EBaseExceptionRetrieve last "maxLine" number of system logs with log level > "level" and from source "source". If the parameter is omitted. All entries are sent back.- Parameters:
req- a Hashtable containing the required information such as log entry, log level, log source, and log name.- Returns:
- NameValue pair list of log messages.
- Throws:
jakarta.servlet.ServletException- For servlet errors.IOException- For input/output problems.EBaseException- For other problems.
-
retrieveLogList
public abstract NameValuePairs retrieveLogList(Hashtable<String, String> req) throws jakarta.servlet.ServletException, IOException, EBaseExceptionRetrieve list of log files.- Throws:
jakarta.servlet.ServletExceptionIOExceptionEBaseException
-
getImplName
Returns implementation name.- Returns:
- String name of event listener implementation.
-
getDescription
Returns the description of this log event listener.- Returns:
- String with listener description.
-
getDefaultParams
-
getInstanceParams
-