at.spardat.xma.boot.logger
Class LogRecord

java.lang.Object
  extended byat.spardat.xma.boot.logger.LogRecord
All Implemented Interfaces:
java.io.Serializable

public class LogRecord
extends java.lang.Object
implements java.io.Serializable

LogRecord

See Also:
Serialized Form

Constructor Summary
LogRecord(LogLevel level, java.lang.String msg)
          Construct a LogRecord with the given level and message values.
 
Method Summary
 LogLevel getLevel()
          Get the logging message level, for example Level.SEVERE.
 java.lang.String getLevelName()
           
 java.lang.String getLoggerName()
          Get the source Logger name's
 java.lang.String getMessage()
           
 long getMillis()
          Get event time in milliseconds since 1970.
 java.lang.Object[] getParameters()
          Get the parameters to the log message.
 java.lang.String getSourceClassName()
           
 java.lang.String getSourceMethodName()
           
 java.lang.Throwable getThrown()
          Get any throwable associated with the log record.
 void setLevel(LogLevel level)
          Set the logging message level, for example Level.SEVERE.
 void setLoggerName(java.lang.String name)
          Set the source Logger name.
 void setMessage(java.lang.String message)
          Set the "raw" log message, before localization or formatting.
 void setMillis(long millis)
          Set event time.
 void setParameters(java.lang.Object[] parameters)
          Set the parameters to the log message.
 void setSourceClassName(java.lang.String sourceClassName)
          Set the name of the class that (allegedly) issued the logging request.
 void setSourceMethodName(java.lang.String sourceMethodName)
           
 void setThrown(java.lang.Throwable thrown)
          Set a throwable associated with the log event.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LogRecord

public LogRecord(LogLevel level,
                 java.lang.String msg)
Construct a LogRecord with the given level and message values.

The sequence property will be initialized with a new unique value. These sequence values are allocated in increasing order within a VM.

The millis property will be initialized to the current time.

The thread ID property will be initialized with a unique ID for the current thread.

All other properties will be initialized to "null".

Parameters:
level - a logging level value
msg - the raw non-localized logging message
Method Detail

getParameters

public java.lang.Object[] getParameters()
Get the parameters to the log message.

Returns:
the log message parameters. May be null if there are no parameters.

setParameters

public void setParameters(java.lang.Object[] parameters)
Set the parameters to the log message.

Parameters:
parameters - the log message parameters.

getLoggerName

public java.lang.String getLoggerName()
Get the source Logger name's

Returns:
source logger name (may be null)

getLevelName

public java.lang.String getLevelName()

setLoggerName

public void setLoggerName(java.lang.String name)
Set the source Logger name.

Parameters:
name - the source logger name (may be null)

getLevel

public LogLevel getLevel()
Get the logging message level, for example Level.SEVERE.

Returns:
the logging message level

setLevel

public void setLevel(LogLevel level)
Set the logging message level, for example Level.SEVERE.

Parameters:
level - the logging message level

getSourceClassName

public java.lang.String getSourceClassName()

setSourceClassName

public void setSourceClassName(java.lang.String sourceClassName)
Set the name of the class that (allegedly) issued the logging request.

Parameters:
sourceClassName - the source class name

getSourceMethodName

public java.lang.String getSourceMethodName()

setSourceMethodName

public void setSourceMethodName(java.lang.String sourceMethodName)

getMessage

public java.lang.String getMessage()

setMessage

public void setMessage(java.lang.String message)
Set the "raw" log message, before localization or formatting.

Parameters:
message - the raw message string

getMillis

public long getMillis()
Get event time in milliseconds since 1970.

Returns:
event time in millis since 1970

setMillis

public void setMillis(long millis)
Set event time.

Parameters:
millis - event time in millis since 1970

getThrown

public java.lang.Throwable getThrown()
Get any throwable associated with the log record.

If the event involved an exception, this will be the exception object. Otherwise null.

Returns:
a throwable

setThrown

public void setThrown(java.lang.Throwable thrown)
Set a throwable associated with the log event.

Parameters:
thrown - a throwable