Record Class ScxLogRecord
java.lang.Object
java.lang.Record
cool.scx.logging.ScxLogRecord
public record ScxLogRecord(LocalDateTime timeStamp, System.Logger.Level level, String loggerName, String message, String threadName, Throwable throwable, StackTraceElement[] contextStack)
extends Record
日志记录
- Version:
- 0.0.1
- Author:
- scx567888
-
Constructor Summary
ConstructorsConstructorDescriptionScxLogRecord(LocalDateTime timeStamp, System.Logger.Level level, String loggerName, String message, String threadName, Throwable throwable, StackTraceElement[] contextStack) Creates an instance of aScxLogRecordrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecontextStackrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.level()Returns the value of thelevelrecord component.Returns the value of theloggerNamerecord component.message()Returns the value of themessagerecord component.Returns the value of thethreadNamerecord component.Returns the value of thethrowablerecord component.Returns the value of thetimeStamprecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ScxLogRecord
public ScxLogRecord(LocalDateTime timeStamp, System.Logger.Level level, String loggerName, String message, String threadName, Throwable throwable, StackTraceElement[] contextStack) Creates an instance of aScxLogRecordrecord class.- Parameters:
timeStamp- the value for thetimeStamprecord componentlevel- the value for thelevelrecord componentloggerName- the value for theloggerNamerecord componentmessage- the value for themessagerecord componentthreadName- the value for thethreadNamerecord componentthrowable- the value for thethrowablerecord componentcontextStack- the value for thecontextStackrecord 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. All components in this record class are compared withObjects::equals(Object,Object). -
timeStamp
Returns the value of thetimeStamprecord component.- Returns:
- the value of the
timeStamprecord 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
-
message
Returns the value of themessagerecord component.- Returns:
- the value of the
messagerecord component
-
threadName
Returns the value of thethreadNamerecord component.- Returns:
- the value of the
threadNamerecord component
-
throwable
Returns the value of thethrowablerecord component.- Returns:
- the value of the
throwablerecord component
-
contextStack
Returns the value of thecontextStackrecord component.- Returns:
- the value of the
contextStackrecord component
-