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 void
flush()
Flush the system output stream.IConfigStore
getConfigStore()
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.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 ev)
Log the given event.NameValuePairs
retrieveLogContent(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".NameValuePairs
retrieveLogList(java.util.Hashtable<java.lang.String,java.lang.String> req)
Retrieve log file list.void
shutdown()
All operations need to be cleaned up for shutdown are done herevoid
startup()
Startup the instance.
-
-
-
Method Detail
-
log
public void log(ILogEvent ev)
Log the given event. Usually called from a log manager.- Specified by:
log
in interfaceILogEventListener
- Parameters:
ev
- log event
-
flush
public void flush()
Flush the system output stream.- Specified by:
flush
in interfaceILogEventListener
-
shutdown
public void shutdown()
All operations need to be cleaned up for shutdown are done here- Specified by:
shutdown
in interfaceILogEventListener
-
getConfigStore
public IConfigStore getConfigStore()
get the configuration store that is associated with this log listener- Specified by:
getConfigStore
in 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:ILogEventListener
Initialize this log listener- Specified by:
init
in interfaceILogEventListener
- Parameters:
owner
- The subsystem.config
- Configuration store for this log listener.- Throws:
EBaseException
-
startup
public void startup() throws EBaseException
Description copied from interface:ILogEventListener
Startup the instance.- Specified by:
startup
in 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:
retrieveLogContent
in 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:
servletException
java.io.IOException
EBaseException
javax.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:
retrieveLogList
in interfaceILogEventListener
- Throws:
javax.servlet.ServletException
java.io.IOException
EBaseException
-
getImplName
public java.lang.String getImplName()
Description copied from interface:ILogEventListener
Returns implementation name.- Specified by:
getImplName
in interfaceILogEventListener
- Returns:
- String name of event listener implementation.
-
getDescription
public java.lang.String getDescription()
Description copied from interface:ILogEventListener
Returns the description of this log event listener.- Specified by:
getDescription
in interfaceILogEventListener
- Returns:
- String with listener description.
-
getDefaultParams
public java.util.Vector<java.lang.String> getDefaultParams()
Description copied from interface:ILogEventListener
Return list of default config parameters for this log event listener.- Specified by:
getDefaultParams
in interfaceILogEventListener
- Returns:
- Vector of default parameters.
-
getInstanceParams
public java.util.Vector<java.lang.String> getInstanceParams()
Description copied from interface:ILogEventListener
Return list of instance config parameters for this log event listener.- Specified by:
getInstanceParams
in interfaceILogEventListener
- Returns:
- Vector of instance parameters.
-
-