org.apache.logging.log4j.core
Interface LogEvent

All Superinterfaces:
Serializable
All Known Implementing Classes:
Log4jLogEvent

public interface LogEvent
extends Serializable


Method Summary
 Map<String,String> getContextMap()
          Get the MDC data.
 Stack<String> getContextStack()
          Get the NDC data.
 String getFQCN()
          Returns the fully qualified class name of the caller of the logging api.
 Level getLevel()
          Get level.
 String getLoggerName()
          Get logger name.
 Marker getMarker()
          Get the Marker associated with the event.
 Message getMessage()
          Get the message associated with the event.
 long getMillis()
          Get event time in milliseconds since 1970.
 StackTraceElement getSource()
          Get source of logging request.
 String getThreadName()
          Get thread name.
 Throwable getThrown()
          Get throwable associated with logging request.
 

Method Detail

getLevel

Level getLevel()
Get level.

Returns:
level.

getLoggerName

String getLoggerName()
Get logger name.

Returns:
logger name, may be null.

getSource

StackTraceElement getSource()
Get source of logging request.

Returns:
source of logging request, may be null.

getMessage

Message getMessage()
Get the message associated with the event.

Returns:
message.

getMarker

Marker getMarker()
Get the Marker associated with the event.

Returns:
Marker

getThreadName

String getThreadName()
Get thread name.

Returns:
thread name, may be null.

getMillis

long getMillis()
Get event time in milliseconds since 1970.

Returns:
milliseconds since 1970.

getThrown

Throwable getThrown()
Get throwable associated with logging request.

Returns:
throwable, may be null.

getContextMap

Map<String,String> getContextMap()
Get the MDC data.

Returns:
A copy of the Mapped Diagnostic Context or null.

getContextStack

Stack<String> getContextStack()
Get the NDC data.

Returns:
A copy of the Nested Diagnostic Context of null;

getFQCN

String getFQCN()
Returns the fully qualified class name of the caller of the logging api.

Returns:
The fully qualified class name of the caller.


Copyright © 1999-2012 Apache Software Foundation. All Rights Reserved.