Top Description Fields Constructors Methods
ch.qos.logback.classic.spi

public Class LoggingEventVO

extends Object
implements ILoggingEvent, Serializable
Class Inheritance
All Implemented Interfaces
java.io.Serializable, ch.qos.logback.classic.spi.ILoggingEvent, ch.qos.logback.core.spi.DeferredProcessingAware
Imports
java.io.IOException, .InvalidObjectException, .ObjectInputStream, .ObjectOutputStream, .Serializable, java.time.Instant, java.util.List, .Map, org.slf4j.Marker, org.slf4j.event.KeyValuePair, org.slf4j.helpers.MessageFormatter, ch.qos.logback.classic.Level

A read-only and serializable implementation of ILoggingEvent.
Author
Ceki Gülcü
Since
0.9.16

Field Summary

Modifier and TypeField and Description
private static final int
private transient Object[]
private StackTraceElement[]
private transient String
private List<KeyValuePair>
private transient Level
private LoggerContextVO
private String
private List<Marker>
private Map<String, String>
private String
private int
private static final int
private static final String
private long
private static final long
private String
private ThrowableProxyVO
private long

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static LoggingEventVO
public boolean
equals(Object
the reference object with which to compare.
obj
)

Overrides java.lang.Object.equals.

Indicates whether some other object is "equal to" this one.
public Object[]
public StackTraceElement[]
getCallerData()

Implements ch.qos.logback.classic.spi.ILoggingEvent.getCallerData.

Return caller data associated with this event.
public long
public LoggerContextVO
public String
public List<KeyValuePair>
public Level
public LoggerContextVO
public String
public List<Marker>
getMarkerList()

Implements ch.qos.logback.classic.spi.ILoggingEvent.getMarkerList.

Since SLF4J 2.0.0, the slf4j logging API assumes the possibility of multiple Marker instances in a logging event.
public Map<String, String>
getMdc()

Implements ch.qos.logback.classic.spi.ILoggingEvent.getMdc.

Synonym for [@link #getMDCPropertyMap}.
public Map<String, String>
public String
public int
getNanoseconds()

Implements ch.qos.logback.classic.spi.ILoggingEvent.getNanoseconds.

Return the number of elapsed nanoseconds found in getInstant() May return -1 if data unavailable.
public long
getSequenceNumber()

Implements ch.qos.logback.classic.spi.ILoggingEvent.getSequenceNumber.

The sequence number associated with this event.
public String
public IThrowableProxy
public long
getTimeStamp()

Implements ch.qos.logback.classic.spi.ILoggingEvent.getTimeStamp.

Return the number of elapsed milliseconds since epoch.
public boolean
hasCallerData()

Implements ch.qos.logback.classic.spi.ILoggingEvent.hasCallerData.

If this event has caller data, then true is returned.
public int
hashCode()

Overrides java.lang.Object.hashCode.

Returns a hash code value for the object.
public void
private void
private void
Inherited from java.lang.Object:
clonefinalizegetClassnotifynotifyAlltoStringwaitwaitwait

Field Detail

ARGUMENT_ARRAY_DESERIALIZATION_LIMITback to summary
private static final int ARGUMENT_ARRAY_DESERIALIZATION_LIMIT
argumentArrayback to summary
private transient Object[] argumentArray
callerDataArrayback to summary
private StackTraceElement[] callerDataArray
formattedMessageback to summary
private transient String formattedMessage
keyValuePairListback to summary
private List<KeyValuePair> keyValuePairList
levelback to summary
private transient Level level
loggerContextVOback to summary
private LoggerContextVO loggerContextVO
loggerNameback to summary
private String loggerName
markerListback to summary
private List<Marker> markerList
mdcPropertyMapback to summary
private Map<String, String> mdcPropertyMap
messageback to summary
private String message
nanosecondsback to summary
private int nanoseconds
NULL_ARGUMENT_ARRAYback to summary
private static final int NULL_ARGUMENT_ARRAY
NULL_ARGUMENT_ARRAY_ELEMENTback to summary
private static final String NULL_ARGUMENT_ARRAY_ELEMENT
sequenceNumberback to summary
private long sequenceNumber
serialVersionUIDback to summary
private static final long serialVersionUID
threadNameback to summary
private String threadName
throwableProxyback to summary
private ThrowableProxyVO throwableProxy
timestampback to summary
private long timestamp

Constructor Detail

LoggingEventVOback to summary
public LoggingEventVO()

Method Detail

buildback to summary
public static LoggingEventVO build(ILoggingEvent le)
equalsback to summary
public boolean equals(Object obj)

Overrides java.lang.Object.equals.

Doc from java.lang.Object.equals.

Indicates whether some other object is "equal to" this one.

The equals method implements an equivalence relation on non-null object references:

  • It is reflexive: for any non-null reference value x, x.equals(x) should return true.
  • It is symmetric: for any non-null reference values x and y, x.equals(y) should return true if and only if y.equals(x) returns true.
  • It is transitive: for any non-null reference values x, y, and z, if x.equals(y) returns true and y.equals(z) returns true, then x.equals(z) should return true.
  • It is consistent: for any non-null reference values x and y, multiple invocations of x.equals(y) consistently return true or consistently return false, provided no information used in equals comparisons on the objects is modified.
  • For any non-null reference value x, x.equals(null) should return false.

An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes.

Parameters
obj:Object

the reference object with which to compare.

Returns:boolean

true if this object is the same as the obj argument; false otherwise.

Annotations
@Override
getArgumentArrayback to summary
public Object[] getArgumentArray()

Implements ch.qos.logback.classic.spi.ILoggingEvent.getArgumentArray.

getCallerDataback to summary
public StackTraceElement[] getCallerData()

Implements ch.qos.logback.classic.spi.ILoggingEvent.getCallerData.

Doc from ch.qos.logback.classic.spi.ILoggingEvent.getCallerData.

Return caller data associated with this event. Note that calling this event may trigger the computation of caller data.

Returns:StackTraceElement[]

the caller data associated with this event.

getContextBirthTimeback to summary
public long getContextBirthTime()
getContextLoggerRemoteViewback to summary
public LoggerContextVO getContextLoggerRemoteView()
getFormattedMessageback to summary
public String getFormattedMessage()

Implements ch.qos.logback.classic.spi.ILoggingEvent.getFormattedMessage.

getKeyValuePairsback to summary
public List<KeyValuePair> getKeyValuePairs()

Implements ch.qos.logback.classic.spi.ILoggingEvent.getKeyValuePairs.

Doc from ch.qos.logback.classic.spi.ILoggingEvent.getKeyValuePairs.

A list of KeyValuePair objects. The returned list may be null.

Returns:List<KeyValuePair>

may be null

Annotations
@Override
getLevelback to summary
public Level getLevel()

Implements ch.qos.logback.classic.spi.ILoggingEvent.getLevel.

getLoggerContextVOback to summary
public LoggerContextVO getLoggerContextVO()

Implements ch.qos.logback.classic.spi.ILoggingEvent.getLoggerContextVO.

getLoggerNameback to summary
public String getLoggerName()

Implements ch.qos.logback.classic.spi.ILoggingEvent.getLoggerName.

getMarkerListback to summary
public List<Marker> getMarkerList()

Implements ch.qos.logback.classic.spi.ILoggingEvent.getMarkerList.

Doc from ch.qos.logback.classic.spi.ILoggingEvent.getMarkerList.

Since SLF4J 2.0.0, the slf4j logging API assumes the possibility of multiple Marker instances in a logging event. Consequently, ILoggingEvent needs to cater for this possibility.

Returns:List<Marker>

the marker list, may be null

getMdcback to summary
public Map<String, String> getMdc()

Implements ch.qos.logback.classic.spi.ILoggingEvent.getMdc.

Doc from ch.qos.logback.classic.spi.ILoggingEvent.getMdc.

Synonym for [@link #getMDCPropertyMap}.

getMDCPropertyMapback to summary
public Map<String, String> getMDCPropertyMap()

Implements ch.qos.logback.classic.spi.ILoggingEvent.getMDCPropertyMap.

Doc from ch.qos.logback.classic.spi.ILoggingEvent.getMDCPropertyMap.

Returns the MDC map. The returned value can be an empty map but not null.

getMessageback to summary
public String getMessage()

Implements ch.qos.logback.classic.spi.ILoggingEvent.getMessage.

getNanosecondsback to summary
public int getNanoseconds()

Implements ch.qos.logback.classic.spi.ILoggingEvent.getNanoseconds.

Doc from ch.qos.logback.classic.spi.ILoggingEvent.getNanoseconds.

Return the number of elapsed nanoseconds found in getInstant() May return -1 if data unavailable.

Returns:int

the number of elapsed nanoseconds as found in getInstant()

Annotations
@Override
getSequenceNumberback to summary
public long getSequenceNumber()

Implements ch.qos.logback.classic.spi.ILoggingEvent.getSequenceNumber.

Doc from ch.qos.logback.classic.spi.ILoggingEvent.getSequenceNumber.

The sequence number associated with this event.

Sequence numbers, if present, should be increasing monotonically.

getThreadNameback to summary
public String getThreadName()

Implements ch.qos.logback.classic.spi.ILoggingEvent.getThreadName.

getThrowableProxyback to summary
public IThrowableProxy getThrowableProxy()

Implements ch.qos.logback.classic.spi.ILoggingEvent.getThrowableProxy.

getTimeStampback to summary
public long getTimeStamp()

Implements ch.qos.logback.classic.spi.ILoggingEvent.getTimeStamp.

Doc from ch.qos.logback.classic.spi.ILoggingEvent.getTimeStamp.

Return the number of elapsed milliseconds since epoch.

Returns:long

the number of elapsed milliseconds since epoch

Annotations
@Override
hasCallerDataback to summary
public boolean hasCallerData()

Implements ch.qos.logback.classic.spi.ILoggingEvent.hasCallerData.

Doc from ch.qos.logback.classic.spi.ILoggingEvent.hasCallerData.

If this event has caller data, then true is returned. Otherwise the returned value is null.

Logback components wishing to use caller data if available without causing it to be computed can invoke this method before invoking getCallerData().

Returns:boolean

whether this event has caller data

hashCodeback to summary
public int hashCode()

Overrides java.lang.Object.hashCode.

Doc from java.lang.Object.hashCode.

Returns a hash code value for the object. This method is supported for the benefit of hash tables such as those provided by java.util.HashMap.

The general contract of hashCode is:

  • Whenever it is invoked on the same object more than once during an execution of a Java application, the hashCode method must consistently return the same integer, provided no information used in equals comparisons on the object is modified. This integer need not remain consistent from one execution of an application to another execution of the same application.
  • If two objects are equal according to the equals method, then calling the hashCode method on each of the two objects must produce the same integer result.
  • It is not required that if two objects are unequal according to the equals method, then calling the hashCode method on each of the two objects must produce distinct integer results. However, the programmer should be aware that producing distinct integer results for unequal objects may improve the performance of hash tables.
Returns:int

a hash code value for this object.

Annotations
@Override
prepareForDeferredProcessingback to summary
public void prepareForDeferredProcessing()

Implements ch.qos.logback.classic.spi.ILoggingEvent.prepareForDeferredProcessing.

readObjectback to summary
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException
writeObjectback to summary
private void writeObject(ObjectOutputStream out) throws IOException