com.resilientedge.util.logger
Class SimpleLogRecord

java.lang.Object
  |
  +--com.resilientedge.util.logger.SimpleLogRecord
All Implemented Interfaces:
LogRecord

public class SimpleLogRecord
extends java.lang.Object
implements LogRecord

This class is an general implementation of a LogRecord. SimpleLogRecord objects can be used to pass logging requests between the logger and individual Handlers.

Author:
odh

Constructor Summary
SimpleLogRecord()
           
 
Method Summary
 java.lang.Object[] getInsertValues()
          Return the Log Record's insert values array.
 int getLevel()
          This method returns the log record's Level.
 Logger getLogger()
          Return the logger that created this record.
 java.lang.String getLoggingClassName()
          Return the class name for the object generating the log request.
 java.lang.Throwable getLoggingException()
          Return the Log Record's exception
 java.lang.String getLoggingMethodName()
          Return the name of the method generating the log request.
 java.lang.Thread getLoggingThread()
          This method returns the Thread responsible for generating the log request.
 java.lang.String getMessage()
          This method returns the actual string to be logged.
 java.lang.String getRawMessage()
          Return the Log Record's raw message.
 long getTimeInMillis()
          Returns the time the log record was created in milliseconds.
 java.lang.String getTopic()
          This method returns the log record's topic.
 void setInsertValues(java.lang.Object[] obj)
          Assign the insert values used for substitution values if a message contains expansion tokens.
 void setLevel(int level)
          Assign the Log Records' Level
 void setLevel(Level level)
          Assign the Log Record's Level.
 void setLogger(Logger logger)
          Assign the Logger responsible for generating this record.
 void setLoggingClassName(java.lang.String className)
          Assign the classname for the object generating the Log request.
 void setLoggingException(java.lang.Throwable exc)
          Assign the exception to be logged.
 void setLoggingMethodName(java.lang.String methodName)
          Assign the name of the Method which generated the log request.
 void setLoggingThread(java.lang.Thread thread)
          Assign the Thread generating the log request.
 void setMessage(java.lang.String message)
          Set the actual message to be exported.
 void setRawMessage(java.lang.String rawMessage)
          The non-localized, non-substituted, non-formatted message.
 void setTimeInMillis(long timeInMillis)
          Set the time the Log Record was created in milliseconds.
 void setTopic(java.lang.String topic)
          Assign the LogRecord's topic.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleLogRecord

public SimpleLogRecord()
Method Detail

setLoggingThread

public void setLoggingThread(java.lang.Thread thread)
Assign the Thread generating the log request.
Specified by:
setLoggingThread in interface LogRecord
Parameters:
thread -  

setLoggingClassName

public void setLoggingClassName(java.lang.String className)
Assign the classname for the object generating the Log request.
Specified by:
setLoggingClassName in interface LogRecord
Parameters:
className -  

setLoggingMethodName

public void setLoggingMethodName(java.lang.String methodName)
Assign the name of the Method which generated the log request.
Specified by:
setLoggingMethodName in interface LogRecord
Parameters:
methodName -  

setLoggingException

public void setLoggingException(java.lang.Throwable exc)
Assign the exception to be logged.
Specified by:
setLoggingException in interface LogRecord
Parameters:
exc -  

setLogger

public void setLogger(Logger logger)
Assign the Logger responsible for generating this record.
Specified by:
setLogger in interface LogRecord
Parameters:
logger -  

setRawMessage

public void setRawMessage(java.lang.String rawMessage)
The non-localized, non-substituted, non-formatted message. This may be a key.
Specified by:
setRawMessage in interface LogRecord
Parameters:
rawMessage -  

setMessage

public void setMessage(java.lang.String message)
Set the actual message to be exported.
Specified by:
setMessage in interface LogRecord
Parameters:
message -  

setTopic

public void setTopic(java.lang.String topic)
Assign the LogRecord's topic.
Specified by:
setTopic in interface LogRecord
Parameters:
topic -  

setLevel

public void setLevel(int level)
Assign the Log Records' Level
Specified by:
setLevel in interface LogRecord
Parameters:
level -  

setLevel

public void setLevel(Level level)
Assign the Log Record's Level.
Parameters:
level -  

setInsertValues

public void setInsertValues(java.lang.Object[] obj)
Assign the insert values used for substitution values if a message contains expansion tokens.
Specified by:
setInsertValues in interface LogRecord
Parameters:
obj -  

setTimeInMillis

public void setTimeInMillis(long timeInMillis)
Set the time the Log Record was created in milliseconds.
Specified by:
setTimeInMillis in interface LogRecord
Parameters:
timeInMillis -  

getLoggingThread

public java.lang.Thread getLoggingThread()
This method returns the Thread responsible for generating the log request.
Specified by:
getLoggingThread in interface LogRecord
Returns:
 

getLoggingClassName

public java.lang.String getLoggingClassName()
Return the class name for the object generating the log request.
Specified by:
getLoggingClassName in interface LogRecord
Returns:
 

getLoggingMethodName

public java.lang.String getLoggingMethodName()
Return the name of the method generating the log request.
Specified by:
getLoggingMethodName in interface LogRecord
Returns:
 

getLoggingException

public java.lang.Throwable getLoggingException()
Return the Log Record's exception
Specified by:
getLoggingException in interface LogRecord
Returns:
 

getLogger

public Logger getLogger()
Return the logger that created this record.
Specified by:
getLogger in interface LogRecord
Returns:
 

getRawMessage

public java.lang.String getRawMessage()
Return the Log Record's raw message.
Specified by:
getRawMessage in interface LogRecord
Returns:
 

getMessage

public java.lang.String getMessage()
This method returns the actual string to be logged.
Specified by:
getMessage in interface LogRecord
Returns:
 

getTopic

public java.lang.String getTopic()
This method returns the log record's topic.
Specified by:
getTopic in interface LogRecord
Returns:
 

getLevel

public int getLevel()
This method returns the log record's Level.
Specified by:
getLevel in interface LogRecord
Returns:
 

getInsertValues

public java.lang.Object[] getInsertValues()
Return the Log Record's insert values array.
Specified by:
getInsertValues in interface LogRecord
Returns:
 

getTimeInMillis

public long getTimeInMillis()
Returns the time the log record was created in milliseconds.
Specified by:
getTimeInMillis in interface LogRecord
Returns:
 


Copyright © 2001 Resilient Edge, Inc. All Rights Reserved.