Package com.netscape.certsrv.logging
Class ConsoleLog
- java.lang.Object
-
- com.netscape.certsrv.logging.ConsoleLog
-
- All Implemented Interfaces:
ILogEventListener,java.util.EventListener
public class ConsoleLog extends java.lang.Object implements ILogEventListener
A log event listener which sends all log events to the system console/tty- Version:
- $Revision$, $Date$
-
-
Constructor Summary
Constructors Constructor Description ConsoleLog()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidflush()Flush the system output stream.IConfigStoregetConfigStore()get the configuration store that is associated with this log listenerjava.util.Vector<java.lang.String>getDefaultParams()Return list of default config parameters for this log event listener.java.lang.StringgetDescription()Returns the description of this log event listener.java.lang.StringgetImplName()Returns implementation name.java.util.Vector<java.lang.String>getInstanceParams()Return list of instance config parameters for this log event listener.voidinit(ISubsystem owner, IConfigStore config)Initialize this log listenervoidlog(ILogEvent ev)Log the given event.NameValuePairsretrieveLogContent(java.util.Hashtable<java.lang.String,java.lang.String> req)Retrieve last "maxLine" number of system log with log lever >"level" and from source "source".NameValuePairsretrieveLogList(java.util.Hashtable<java.lang.String,java.lang.String> req)Retrieve log file list.voidshutdown()All operations need to be cleaned up for shutdown are done herevoidstartup()Startup the instance.
-
-
-
Method Detail
-
log
public void log(ILogEvent ev)
Log the given event. Usually called from a log manager.- Specified by:
login interfaceILogEventListener- Parameters:
ev- log event
-
flush
public void flush()
Flush the system output stream.- Specified by:
flushin interfaceILogEventListener
-
shutdown
public void shutdown()
All operations need to be cleaned up for shutdown are done here- Specified by:
shutdownin interfaceILogEventListener
-
getConfigStore
public IConfigStore getConfigStore()
get the configuration store that is associated with this log listener- Specified by:
getConfigStorein interfaceILogEventListener- Returns:
- the configuration store that is associated with this log listener
-
init
public void init(ISubsystem owner, IConfigStore config) throws EBaseException
Description copied from interface:ILogEventListenerInitialize this log listener- Specified by:
initin interfaceILogEventListener- Parameters:
owner- The subsystem.config- Configuration store for this log listener.- Throws:
EBaseException
-
startup
public void startup() throws EBaseExceptionDescription copied from interface:ILogEventListenerStartup the instance.- Specified by:
startupin interfaceILogEventListener- Throws:
EBaseException
-
retrieveLogContent
public 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 log with log lever >"level" and from source "source". If the parameter is omitted. All entries are sent back.- Specified by:
retrieveLogContentin interfaceILogEventListener- Parameters:
req- a Hashtable containing the required information such as log entry, log level, log source, and log name- Returns:
- the content of the log that match the criteria in req
- Throws:
servletExceptionjava.io.IOExceptionEBaseExceptionjavax.servlet.ServletException- For Servelet errros.
-
retrieveLogList
public NameValuePairs retrieveLogList(java.util.Hashtable<java.lang.String,java.lang.String> req) throws javax.servlet.ServletException, java.io.IOException, EBaseException
Retrieve log file list.
unimplemented- Specified by:
retrieveLogListin interfaceILogEventListener- Throws:
javax.servlet.ServletExceptionjava.io.IOExceptionEBaseException
-
getImplName
public java.lang.String getImplName()
Description copied from interface:ILogEventListenerReturns implementation name.- Specified by:
getImplNamein interfaceILogEventListener- Returns:
- String name of event listener implementation.
-
getDescription
public java.lang.String getDescription()
Description copied from interface:ILogEventListenerReturns the description of this log event listener.- Specified by:
getDescriptionin interfaceILogEventListener- Returns:
- String with listener description.
-
getDefaultParams
public java.util.Vector<java.lang.String> getDefaultParams()
Description copied from interface:ILogEventListenerReturn list of default config parameters for this log event listener.- Specified by:
getDefaultParamsin interfaceILogEventListener- Returns:
- Vector of default parameters.
-
getInstanceParams
public java.util.Vector<java.lang.String> getInstanceParams()
Description copied from interface:ILogEventListenerReturn list of instance config parameters for this log event listener.- Specified by:
getInstanceParamsin interfaceILogEventListener- Returns:
- Vector of instance parameters.
-
-