Package com.netscape.certsrv.logging
Interface ILogEventListener
-
- All Superinterfaces:
java.util.EventListener
- All Known Implementing Classes:
LogFile
,RollingLogFile
public interface ILogEventListener extends java.util.EventListener
An interface represents a log event listener. A ILogEventListener 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$
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
flush()
Flushes the log buffers (if any).IConfigStore
getConfigStore()
Get the configuration store for the log event listener.java.util.Vector<java.lang.String>
getDefaultParams()
Return list of default config parameters for this log event listener.java.lang.String
getDescription()
Returns the description of this log event listener.java.lang.String
getImplName()
Returns implementation name.java.util.Vector<java.lang.String>
getInstanceParams()
Return list of instance config parameters for this log event listener.void
init(ISubsystem owner, IConfigStore config)
Initialize this log listenervoid
log(ILogEvent event)
The event notification method: Logs event.NameValuePairs
retrieveLogContent(java.util.Hashtable<java.lang.String,java.lang.String> req)
Retrieve last "maxLine" number of system logs with log level >"level" and from source "source".NameValuePairs
retrieveLogList(java.util.Hashtable<java.lang.String,java.lang.String> req)
Retrieve list of log files.void
shutdown()
Closes the log file and destroys any associated threads.void
startup()
Startup the instance.
-
-
-
Method Detail
-
log
void log(ILogEvent event) throws ELogException
The event notification method: Logs event.- Parameters:
event
- The log event to be processed.- Throws:
ELogException
-
flush
void flush()
Flushes the log buffers (if any). Will result in the messages being actually written to their destination.
-
shutdown
void shutdown()
Closes the log file and destroys any associated threads.
-
getConfigStore
IConfigStore getConfigStore()
Get the configuration store for the log event listener.- Returns:
- The configuration store of this log event listener.
-
init
void init(ISubsystem owner, IConfigStore config) throws EBaseException
Initialize this log listener- Parameters:
owner
- The subsystem.config
- Configuration store for this log listener.- Throws:
initialization
- error.EBaseException
-
startup
void startup() throws EBaseException
Startup the instance.- Throws:
EBaseException
-
retrieveLogContent
NameValuePairs retrieveLogContent(java.util.Hashtable<java.lang.String,java.lang.String> req) throws javax.servlet.ServletException, java.io.IOException, EBaseException
Retrieve 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:
javax.servlet.ServletException
- For Servelet errros.java.io.IOException
- For input/output problems.EBaseException
- For other problems.
-
retrieveLogList
NameValuePairs retrieveLogList(java.util.Hashtable<java.lang.String,java.lang.String> req) throws javax.servlet.ServletException, java.io.IOException, EBaseException
Retrieve list of log files.- Throws:
javax.servlet.ServletException
java.io.IOException
EBaseException
-
getImplName
java.lang.String getImplName()
Returns implementation name.- Returns:
- String name of event listener implementation.
-
getDescription
java.lang.String getDescription()
Returns the description of this log event listener.- Returns:
- String with listener description.
-
getDefaultParams
java.util.Vector<java.lang.String> getDefaultParams()
Return list of default config parameters for this log event listener.- Returns:
- Vector of default parameters.
-
getInstanceParams
java.util.Vector<java.lang.String> getInstanceParams()
Return list of instance config parameters for this log event listener.- Returns:
- Vector of instance parameters.
-
-