de.infinityloop.util.log
Class LogEntry

java.lang.Object
  extended by de.infinityloop.util.log.LogEntry

public class LogEntry
extends java.lang.Object

Holds the full information of a log message.

Since:
5.2.5
Author:
chris

Constructor Summary
LogEntry(int type, int err, java.lang.String msg, java.lang.Object[] prm, java.lang.Throwable t)
          Constructor for an element of a NotificationCollector entry list.
 
Method Summary
 java.lang.Throwable getEmbeddedException()
          Retrieves any embedded exception.
 int getErrorCode()
          Retrieves the error code.
 java.lang.String getMessage()
          retrieves the message as String
 java.lang.Object[] getParameters()
          retrieves the parameter objects for this entry which were used to format the message
 int getType()
          retrieves the type of the entry, one of: NotificationCollector.DEBUG NotificationCollector.INFO NotificationCollector.WARN NotificationCollector.ERROR NotificationCollector.FATAL
 java.lang.Object getUserObject()
           
 void setUserObject(java.lang.Object userObject)
           
 java.lang.String toString()
          Same as getMessage()
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LogEntry

public LogEntry(int type,
                int err,
                java.lang.String msg,
                java.lang.Object[] prm,
                java.lang.Throwable t)
Constructor for an element of a NotificationCollector entry list.

Parameters:
type - the type of the entry, one of:
  • NotificationCollector.DEBUG
  • NotificationCollector.INFO
  • NotificationCollector.WARN
  • NotificationCollector.ERROR
  • NotificationCollector.FATAL
err - the error code
msg - the completely resolved message string
prm - the parameters used for formatting the message
t - any Exception to be embedded
See Also:
NotificationCollector
Method Detail

getEmbeddedException

public java.lang.Throwable getEmbeddedException()
Retrieves any embedded exception. Returns null when there is none.

Returns:
the Throwable object or null

getErrorCode

public int getErrorCode()
Retrieves the error code.

Returns:
the error code
See Also:
NotificationCollector, Msg

getMessage

public java.lang.String getMessage()
retrieves the message as String

Returns:
the message as human readable String
See Also:
Msg

getParameters

public java.lang.Object[] getParameters()
retrieves the parameter objects for this entry which were used to format the message

Returns:
the parameter Object[] array or null if not available
See Also:
Msg

toString

public java.lang.String toString()
Same as getMessage()

Overrides:
toString in class java.lang.Object

getType

public int getType()
retrieves the type of the entry, one of:

Returns:
the type
See Also:
NotificationCollector

getUserObject

public java.lang.Object getUserObject()
Returns:
Returns the userObject.

setUserObject

public void setUserObject(java.lang.Object userObject)
Parameters:
userObject - The userObject to set.