Package org.slf4j.event
Class DefaultLoggingEvent
- java.lang.Object
-
- org.slf4j.event.DefaultLoggingEvent
-
- All Implemented Interfaces:
LoggingEvent
public class DefaultLoggingEvent extends java.lang.Object implements LoggingEvent
A default implementation ofLoggingEvent.- Since:
- 2.0.0
- Author:
- Ceki Gülcü
-
-
Constructor Summary
Constructors Constructor Description DefaultLoggingEvent(Level level, Logger logger)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddArgument(java.lang.Object p)voidaddArguments(java.lang.Object... args)voidaddKeyValue(java.lang.String key, java.lang.Object value)voidaddMarker(Marker marker)java.lang.Object[]getArgumentArray()java.util.List<java.lang.Object>getArguments()java.lang.StringgetCallerBoundary()Returns the presumed caller boundary provided by the logging library (not the user of the library).java.util.List<KeyValuePair>getKeyValuePairs()LevelgetLevel()java.lang.StringgetLoggerName()java.util.List<Marker>getMarkers()List of markers in the event, might be null.java.lang.StringgetMessage()java.lang.StringgetThreadName()java.lang.ThrowablegetThrowable()longgetTimeStamp()voidsetCallerBoundary(java.lang.String fqcn)voidsetMessage(java.lang.String message)voidsetThrowable(java.lang.Throwable cause)voidsetTimeStamp(long timeStamp)
-
-
-
Constructor Detail
-
DefaultLoggingEvent
public DefaultLoggingEvent(Level level, Logger logger)
-
-
Method Detail
-
getMarkers
public java.util.List<Marker> getMarkers()
Description copied from interface:LoggingEventList of markers in the event, might be null.- Specified by:
getMarkersin interfaceLoggingEvent- Returns:
- markers in the event, might be null.
-
addArgument
public void addArgument(java.lang.Object p)
-
addArguments
public void addArguments(java.lang.Object... args)
-
getArguments
public java.util.List<java.lang.Object> getArguments()
- Specified by:
getArgumentsin interfaceLoggingEvent
-
getArgumentArray
public java.lang.Object[] getArgumentArray()
- Specified by:
getArgumentArrayin interfaceLoggingEvent
-
addKeyValue
public void addKeyValue(java.lang.String key, java.lang.Object value)
-
getKeyValuePairs
public java.util.List<KeyValuePair> getKeyValuePairs()
- Specified by:
getKeyValuePairsin interfaceLoggingEvent
-
setThrowable
public void setThrowable(java.lang.Throwable cause)
-
getLevel
public Level getLevel()
- Specified by:
getLevelin interfaceLoggingEvent
-
getLoggerName
public java.lang.String getLoggerName()
- Specified by:
getLoggerNamein interfaceLoggingEvent
-
getMessage
public java.lang.String getMessage()
- Specified by:
getMessagein interfaceLoggingEvent
-
setMessage
public void setMessage(java.lang.String message)
-
getThrowable
public java.lang.Throwable getThrowable()
- Specified by:
getThrowablein interfaceLoggingEvent
-
getThreadName
public java.lang.String getThreadName()
- Specified by:
getThreadNamein interfaceLoggingEvent
-
getTimeStamp
public long getTimeStamp()
- Specified by:
getTimeStampin interfaceLoggingEvent
-
setTimeStamp
public void setTimeStamp(long timeStamp)
-
setCallerBoundary
public void setCallerBoundary(java.lang.String fqcn)
-
getCallerBoundary
public java.lang.String getCallerBoundary()
Description copied from interface:LoggingEventReturns the presumed caller boundary provided by the logging library (not the user of the library). Null by default.- Specified by:
getCallerBoundaryin interfaceLoggingEvent- Returns:
- presumed caller, null by default.
-
-