Record Class LogSnapshot
java.lang.Object
java.lang.Record
org.apache.sling.mcp.server.contribs.log.LogSnapshot
public record LogSnapshot(long timeMillis, String level, String loggerName, String threadName, String formattedMessage, String throwableText, Map<String,String> mdc)
extends Record
Stores only the lightweight, stable parts of a log event so the in-memory buffer
does not retain full logging event object graphs.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.Returns the value of theformattedMessagerecord component.final inthashCode()Returns a hash code value for this object.level()Returns the value of thelevelrecord component.Returns the value of theloggerNamerecord component.mdc()Returns the value of themdcrecord component.Returns the value of thethreadNamerecord component.Returns the value of thethrowableTextrecord component.longReturns the value of thetimeMillisrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
LogSnapshot
public LogSnapshot(long timeMillis, String level, String loggerName, String threadName, String formattedMessage, String throwableText, Map<String, String> mdc) Creates an instance of aLogSnapshotrecord class.- Parameters:
timeMillis- the value for thetimeMillisrecord componentlevel- the value for thelevelrecord componentloggerName- the value for theloggerNamerecord componentthreadName- the value for thethreadNamerecord componentformattedMessage- the value for theformattedMessagerecord componentthrowableText- the value for thethrowableTextrecord componentmdc- the value for themdcrecord component
-
-
Method Details
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
timeMillis
public long timeMillis()Returns the value of thetimeMillisrecord component.- Returns:
- the value of the
timeMillisrecord component
-
level
Returns the value of thelevelrecord component.- Returns:
- the value of the
levelrecord component
-
loggerName
Returns the value of theloggerNamerecord component.- Returns:
- the value of the
loggerNamerecord component
-
threadName
Returns the value of thethreadNamerecord component.- Returns:
- the value of the
threadNamerecord component
-
formattedMessage
Returns the value of theformattedMessagerecord component.- Returns:
- the value of the
formattedMessagerecord component
-
throwableText
Returns the value of thethrowableTextrecord component.- Returns:
- the value of the
throwableTextrecord component
-
mdc
-