java.lang.Object
java.lang.Record
org.mbari.jcommons.util.Logging
public record Logging(System.Logger logger, System.Logger.Level level, Throwable cause)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionLogging(System.Logger logger) Logging(System.Logger logger, System.Logger.Level level, Throwable cause) Creates an instance of aLoggingrecord class. -
Method Summary
Modifier and TypeMethodDescriptionatDebug()atError()atInfo()atTrace()atWarn()cause()Returns the value of thecauserecord 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.voidvoidlogger()Returns the value of theloggerrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Logging
-
Logging
-
Logging
-
Logging
Creates an instance of aLoggingrecord class.- Parameters:
logger- the value for theloggerrecord componentlevel- the value for thelevelrecord componentcause- the value for thecauserecord component
-
-
Method Details
-
atTrace
-
atDebug
-
atInfo
-
atWarn
-
atError
-
withCause
-
log
-
log
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
logger
Returns the value of theloggerrecord component.- Returns:
- the value of the
loggerrecord component
-
level
Returns the value of thelevelrecord component.- Returns:
- the value of the
levelrecord component
-
cause
Returns the value of thecauserecord component.- Returns:
- the value of the
causerecord component
-