Package com.netscape.certsrv.logging
Class SystemEvent
- java.lang.Object
-
- com.netscape.certsrv.logging.LogEvent
-
- com.netscape.certsrv.logging.SystemEvent
-
- All Implemented Interfaces:
ILogEvent,java.io.Serializable
public class SystemEvent extends LogEvent
The log event object that carries a log message. This class represents System events which are CMS events which need to be logged to a log file.- Version:
- $Revision$, $Date$
- See Also:
MessageFormat,LogResources, Serialized Form
-
-
Constructor Summary
Constructors Constructor Description SystemEvent()SystemEvent(java.lang.Exception e)Constructs a SystemEvent message from a base exception.SystemEvent(java.lang.String msgFormat)Constructs a SystemEvent message event.SystemEvent(java.lang.String msgFormat, java.lang.Exception exception)Constructs a SystemEvent message from an exception.SystemEvent(java.lang.String msgFormat, java.lang.Object[] params)Constructs a SystemEvent message event with a list of parameters that will be substituted into the message format.SystemEvent(java.lang.String msgFormat, java.lang.String param)Constructs a SystemEvent message with a parameter.
-
Method Summary
-
Methods inherited from class com.netscape.certsrv.logging.LogEvent
getEventType, getLevel, getMessage, getMultiline, getNTEventType, getParameters, getSource, getTimeStamp, setEventType, setLevel, setMessage, setMultiline, setParameters, setSource, toString
-
-
-
-
Constructor Detail
-
SystemEvent
public SystemEvent()
-
SystemEvent
public SystemEvent(java.lang.String msgFormat)
Constructs a SystemEvent message event.- Parameters:
msgFormat- The message string.
-
SystemEvent
public SystemEvent(java.lang.String msgFormat, java.lang.String param)Constructs a SystemEvent message with a parameter. For example,new SystemEvent("failed to load {0}", fileName);- Parameters:
msgFormat- Details in message string format.param- Message string parameter.
-
SystemEvent
public SystemEvent(java.lang.String msgFormat, java.lang.Exception exception)Constructs a SystemEvent message from an exception. It can be used to carry a system exception that may contain information about the context. For example,try { ... } catch (IOExeption e) { logHandler.log(new SystemEvent("Encountered System Error {0}", e); }- Parameters:
msgFormat- Exception details in message string format.exception- System exception.
-
SystemEvent
public SystemEvent(java.lang.Exception e)
Constructs a SystemEvent message from a base exception. This will use the msgFormat from the exception itself.try { ... } catch (Exception e) { logHandler.log(new SystemEvent(e)); }- Parameters:
e- CMS exception.
-
SystemEvent
public SystemEvent(java.lang.String msgFormat, java.lang.Object[] params)Constructs a SystemEvent message event with a list of parameters that will be substituted into the message format.- Parameters:
msgFormat- Message string format.params- List of message format parameters.
-
-