org.jwarp.service.log
Class LogEvent

java.lang.Object
  |
  +--org.jwarp.service.log.LogEvent

public class LogEvent
extends java.lang.Object

Event generated from log instances.

Version:
1.0
Author:
Marting Schaefer

Constructor Summary
LogEvent(java.lang.String logName, java.lang.String message, int logLevel)
          Creates a new log event.
 
Method Summary
 java.util.GregorianCalendar getDate()
          Get the event's date
 int getLogLevel()
          Return the currently set log level.
static java.lang.String getLogLevelName(int logLevel)
          Returns a string for the given log level
static int getLogLevelNumber(java.lang.String logLevelName)
          Gets the log level number from the corresponding log level name
 java.lang.String getLogName()
          Return the name of the log that triggered this event.
 java.lang.String getMessage()
          Get the event's message
 java.lang.String toString()
          Get a string representation of the event.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LogEvent

public LogEvent(java.lang.String logName,
                java.lang.String message,
                int logLevel)
Creates a new log event.
Parameters:
message - The log message$
logLevel - The log level
Method Detail

getMessage

public java.lang.String getMessage()
Get the event's message
Returns:
The message

getLogName

public java.lang.String getLogName()
Return the name of the log that triggered this event.
Returns:
The log's name

getDate

public java.util.GregorianCalendar getDate()
Get the event's date
Returns:
the date

toString

public java.lang.String toString()
Get a string representation of the event.
Overrides:
toString in class java.lang.Object
Returns:
the event string representation of the form
[LogName][Date and Time] message

getLogLevel

public int getLogLevel()
Return the currently set log level.
Returns:
log level

getLogLevelName

public static java.lang.String getLogLevelName(int logLevel)
Returns a string for the given log level
Parameters:
logLevel - The log level

getLogLevelNumber

public static int getLogLevelNumber(java.lang.String logLevelName)
Gets the log level number from the corresponding log level name
Returns:
The log level number

©   O R C A   S y s t e m s