org.ops4j.pax.logging.service.internal
Class PaxLoggingEventImpl

java.lang.Object
  extended by org.ops4j.pax.logging.service.internal.PaxLoggingEventImpl
All Implemented Interfaces:
java.io.Serializable, PaxLoggingEvent

public class PaxLoggingEventImpl
extends java.lang.Object
implements java.io.Serializable, PaxLoggingEvent

The internal representation of logging events. When an affirmative decision is made to log then a LoggingEvent instance is created. This instance is passed around to the different log4j components.

This class is of concern to those wishing to extend log4j.

Since:
0.8.2
Author:
Ceki Gülcü, James P. Cakalic, Niclas Hedhman
See Also:
Serialized Form

Constructor Summary
PaxLoggingEventImpl(LoggingEvent event)
           
 
Method Summary
 java.lang.String getFQNOfLoggerClass()
          Get the fully qualified name of the calling logger sub-class/wrapper.
 PaxLevel getLevel()
          Return the level of this event.
 PaxLocationInfo getLocationInformation()
          Set the location information for this logging event.
 java.lang.String getLoggerName()
          Return the name of the logger.
 java.lang.String getMessage()
          Return the message for this logging event.
 java.util.Map getProperties()
          Returns the set of properties for the event.
 java.lang.String getRenderedMessage()
           
 java.lang.String getThreadName()
           
 java.lang.String[] getThrowableStrRep()
          Return this event's throwable's string[] representaion.
 long getTimeStamp()
          Getter for the event's time stamp.
 boolean locationInformationExists()
          Check for the existence of location information without creating it (a byproduct of calling getLocationInformation).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PaxLoggingEventImpl

public PaxLoggingEventImpl(LoggingEvent event)
Method Detail

getLocationInformation

public PaxLocationInfo getLocationInformation()
Set the location information for this logging event. The collected information is cached for future use.

Specified by:
getLocationInformation in interface PaxLoggingEvent

getLevel

public PaxLevel getLevel()
Return the level of this event. Use this form instead of directly accessing the level field.

Specified by:
getLevel in interface PaxLoggingEvent

getLoggerName

public java.lang.String getLoggerName()
Return the name of the logger. Use this form instead of directly accessing the categoryName field.

Specified by:
getLoggerName in interface PaxLoggingEvent

getMessage

public java.lang.String getMessage()
Return the message for this logging event.

Specified by:
getMessage in interface PaxLoggingEvent

getRenderedMessage

public java.lang.String getRenderedMessage()
Specified by:
getRenderedMessage in interface PaxLoggingEvent

getThreadName

public java.lang.String getThreadName()
Specified by:
getThreadName in interface PaxLoggingEvent

getThrowableStrRep

public java.lang.String[] getThrowableStrRep()
Return this event's throwable's string[] representaion.

Specified by:
getThrowableStrRep in interface PaxLoggingEvent

locationInformationExists

public final boolean locationInformationExists()
Check for the existence of location information without creating it (a byproduct of calling getLocationInformation).

Specified by:
locationInformationExists in interface PaxLoggingEvent
Returns:
true if location information has been extracted.
Since:
1.2.15

getTimeStamp

public final long getTimeStamp()
Getter for the event's time stamp. The time stamp is calculated starting from 1970-01-01 GMT.

Specified by:
getTimeStamp in interface PaxLoggingEvent
Returns:
timestamp
Since:
1.2.15

getFQNOfLoggerClass

public java.lang.String getFQNOfLoggerClass()
Get the fully qualified name of the calling logger sub-class/wrapper. Provided for compatibility with log4j 1.3

Specified by:
getFQNOfLoggerClass in interface PaxLoggingEvent
Returns:
fully qualified class name, may be null.
Since:
1.2.15

getProperties

public java.util.Map getProperties()
Returns the set of properties for the event. The returned set is unmodifiable by the caller. Provided for compatibility with log4j 1.3

Specified by:
getProperties in interface PaxLoggingEvent
Returns:
Set an unmodifiable map of the properties.
Since:
1.2.15


Copyright © 2006-2010 OPS4J - Open Participation Software for Java. All Rights Reserved.