com.acsinet_solutions.util.log
Class Log4JLoggingEventWrapper
java.lang.Object
org.apache.log4j.spi.LoggingEvent
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
| 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. |
| 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 |
Log4JLoggingEventWrapper
public Log4JLoggingEventWrapper(org.apache.log4j.spi.LoggingEvent event)
- Public constructor, that wraps another LoggingEvent.
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