Package cimerant.logger
Record Class LogRecord
java.lang.Object
java.lang.Record
cimerant.logger.LogRecord
- Record Components:
nanoTime
- message time in nanoseconds.loggerName
- logger name associated with the message.level
-Level
associated with the message.marker
-Marker
associated with the message.message
- message associated with the log.exception
-Throwable
associated with the log.
public record LogRecord(long nanoTime, String loggerName, Level level, Marker marker, String message, Throwable exception)
extends Record
The
LogRecord
class represents the message and associated data at the time of logging.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.Returns the value of theexception
record component.final int
hashCode()
Returns a hash code value for this object.level()
Returns the value of thelevel
record component.Returns the value of theloggerName
record component.marker()
Returns the value of themarker
record component.message()
Returns the value of themessage
record component.long
nanoTime()
Returns the value of thenanoTime
record component.toString()
Returns a string representation of the object.
-
Constructor Details
-
LogRecord
public LogRecord(long nanoTime, String loggerName, Level level, Marker marker, String message, Throwable exception) Creates an instance of aLogRecord
record class.- Parameters:
nanoTime
- the value for thenanoTime
record componentloggerName
- the value for theloggerName
record componentlevel
- the value for thelevel
record componentmarker
- the value for themarker
record componentmessage
- the value for themessage
record componentexception
- the value for theexception
record component
-
-
Method Details
-
toString
Returns a string representation of the object. -
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 '=='. -
nanoTime
public long nanoTime()Returns the value of thenanoTime
record component.- Returns:
- the value of the
nanoTime
record component
-
loggerName
Returns the value of theloggerName
record component.- Returns:
- the value of the
loggerName
record component
-
level
Returns the value of thelevel
record component.- Returns:
- the value of the
level
record component
-
marker
Returns the value of themarker
record component.- Returns:
- the value of the
marker
record component
-
message
Returns the value of themessage
record component.- Returns:
- the value of the
message
record component
-
exception
Returns the value of theexception
record component.- Returns:
- the value of the
exception
record component
-