com.acsinet_solutions.util.log
Class Log4JLoggingEventWrapper

java.lang.Object
  extended by org.apache.log4j.spi.LoggingEvent
      extended by com.acsinet_solutions.util.log.Log4JLoggingEventWrapper
All Implemented Interfaces:
java.io.Serializable

public class Log4JLoggingEventWrapper
extends org.apache.log4j.spi.LoggingEvent

A wrapper for LoggingEvents. The inheritance hierarchy is abused because no EventWrapper interface exists, and it's not desired to change the original implementation.

What this class does is to wrap an original LoggingEvent instance, dropping the Throwable information of the given LoggingEvent. This is because throwable information will be displayed using the alternative methods provided by Log4JExtendedPatternLayout.

Author:
Santiago Arriaga
See Also:
Log4JExtendedPatternLayout, Serialized Form

Field Summary
 
Fields inherited from class org.apache.log4j.spi.LoggingEvent
categoryName, fqnOfCategoryClass, level, timeStamp
 
Constructor Summary
Log4JLoggingEventWrapper(org.apache.log4j.spi.LoggingEvent event)
          Public constructor, that wraps another LoggingEvent.
 
Method Summary
 org.apache.log4j.Level getLevel()
           
 org.apache.log4j.spi.LocationInfo getLocationInformation()
           
 java.lang.String getLoggerName()
           
 java.lang.Object getMDC(java.lang.String key)
           
 void getMDCCopy()
           
 java.lang.String getNDC()
           
 java.lang.String getRenderedMessage()
           
 java.lang.String getThreadName()
           
 
Methods inherited from class org.apache.log4j.spi.LoggingEvent
getMessage, getStartTime, getThrowableInformation, getThrowableStrRep
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Log4JLoggingEventWrapper

public Log4JLoggingEventWrapper(org.apache.log4j.spi.LoggingEvent event)
Public constructor, that wraps another LoggingEvent.

Method Detail

getLevel

public final org.apache.log4j.Level getLevel()
Overrides:
getLevel in class org.apache.log4j.spi.LoggingEvent

getLocationInformation

public final org.apache.log4j.spi.LocationInfo getLocationInformation()
Overrides:
getLocationInformation in class org.apache.log4j.spi.LoggingEvent

getLoggerName

public final java.lang.String getLoggerName()
Overrides:
getLoggerName in class org.apache.log4j.spi.LoggingEvent

getMDC

public final java.lang.Object getMDC(java.lang.String key)
Overrides:
getMDC in class org.apache.log4j.spi.LoggingEvent

getMDCCopy

public final void getMDCCopy()
Overrides:
getMDCCopy in class org.apache.log4j.spi.LoggingEvent

getNDC

public final java.lang.String getNDC()
Overrides:
getNDC in class org.apache.log4j.spi.LoggingEvent

getRenderedMessage

public final java.lang.String getRenderedMessage()
Overrides:
getRenderedMessage in class org.apache.log4j.spi.LoggingEvent

getThreadName

public final java.lang.String getThreadName()
Overrides:
getThreadName in class org.apache.log4j.spi.LoggingEvent