Record Class ServerErrorEntry
java.lang.Object
java.lang.Record
nl.pim16aap2.lightkeeper.protocol.ServerErrorEntry
- Record Components:
timestampMillis- Epoch milliseconds at which the log event was created.severity- Severity bucket derived from the numeric log level:"ERROR"for error-or-worse events,"WARNING"otherwise.levelName- Original log level name (e.g."ERROR","WARN","FATAL") for display purposes.loggerName- Name of the logger that emitted the event.threadName- Name of the thread that emitted the event.message- Formatted log message.throwableClass- Fully-qualified class name of the attached throwable, ornullwhen the event carried none.throwableMessage- Message of the attached throwable, ornullwhen absent.stackTrace- Rendered stack trace lines of the attached throwable including its cause chain (possibly truncated); empty when the event carried no throwable.
public record ServerErrorEntry(long timestampMillis, String severity, String levelName, String loggerName, String threadName, String message, @Nullable String throwableClass, @Nullable String throwableMessage, List<String> stackTrace)
extends Record
Typed snapshot of a single captured server error or warning, carried directly inside protocol responses.
Entries are captured by the agent's Log4j appender as structured log events, so the throwable metadata
reflects the actual Throwable attached to the log event rather than text scraped from console output.
-
Constructor Summary
ConstructorsConstructorDescriptionServerErrorEntry(long timestampMillis, String severity, String levelName, String loggerName, String threadName, String message, @Nullable String throwableClass, @Nullable String throwableMessage, List<String> stackTrace) Validates required fields and defensively copies the stack trace. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of thelevelNamerecord component.Returns the value of theloggerNamerecord component.message()Returns the value of themessagerecord component.severity()Returns the value of theseverityrecord component.Returns the value of thestackTracerecord component.Returns the value of thethreadNamerecord component.@Nullable StringReturns the value of thethrowableClassrecord component.@Nullable StringReturns the value of thethrowableMessagerecord component.longReturns the value of thetimestampMillisrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ServerErrorEntry
public ServerErrorEntry(long timestampMillis, String severity, String levelName, String loggerName, String threadName, String message, @Nullable String throwableClass, @Nullable String throwableMessage, List<String> stackTrace) Validates required fields and defensively copies the stack trace.
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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 '=='. -
timestampMillis
public long timestampMillis()Returns the value of thetimestampMillisrecord component.- Returns:
- the value of the
timestampMillisrecord component
-
severity
Returns the value of theseverityrecord component.- Returns:
- the value of the
severityrecord component
-
levelName
Returns the value of thelevelNamerecord component.- Returns:
- the value of the
levelNamerecord 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
-
message
Returns the value of themessagerecord component.- Returns:
- the value of the
messagerecord component
-
throwableClass
Returns the value of thethrowableClassrecord component.- Returns:
- the value of the
throwableClassrecord component
-
throwableMessage
Returns the value of thethrowableMessagerecord component.- Returns:
- the value of the
throwableMessagerecord component
-
stackTrace
Returns the value of thestackTracerecord component.- Returns:
- the value of the
stackTracerecord component
-