Record Class SFLogAppender.SFLogEvent
java.lang.Object
java.lang.Record
com.soulfiremc.shared.SFLogAppender.SFLogEvent
- Enclosing class:
SFLogAppender
public static record SFLogAppender.SFLogEvent(String id, String message, long timestamp, @Nullable String level, @Nullable String loggerName, @Nullable UUID instanceId, @Nullable UUID botAccountId, @Nullable UUID scriptId, @Nullable String instanceName, @Nullable String botAccountName)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionSFLogEvent(String id, String message, long timestamp, @Nullable String level, @Nullable String loggerName, @Nullable UUID instanceId, @Nullable UUID botAccountId, @Nullable UUID scriptId, @Nullable String instanceName, @Nullable String botAccountName) Creates an instance of aSFLogEventrecord class. -
Method Summary
Modifier and TypeMethodDescription@Nullable UUIDReturns the value of thebotAccountIdrecord component.@Nullable StringReturns the value of thebotAccountNamerecord component.final booleanIndicates whether some other object is "equal to" this one.static SFLogAppender.SFLogEventfinal inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.@Nullable UUIDReturns the value of theinstanceIdrecord component.@Nullable StringReturns the value of theinstanceNamerecord component.@Nullable Stringlevel()Returns the value of thelevelrecord component.@Nullable StringReturns the value of theloggerNamerecord component.message()Returns the value of themessagerecord component.@Nullable UUIDscriptId()Returns the value of thescriptIdrecord component.longReturns the value of thetimestamprecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
SFLogEvent
public SFLogEvent(String id, String message, long timestamp, @Nullable String level, @Nullable String loggerName, @Nullable UUID instanceId, @Nullable UUID botAccountId, @Nullable UUID scriptId, @Nullable String instanceName, @Nullable String botAccountName) Creates an instance of aSFLogEventrecord class.- Parameters:
id- the value for theidrecord componentmessage- the value for themessagerecord componenttimestamp- the value for thetimestamprecord componentlevel- the value for thelevelrecord componentloggerName- the value for theloggerNamerecord componentinstanceId- the value for theinstanceIdrecord componentbotAccountId- the value for thebotAccountIdrecord componentscriptId- the value for thescriptIdrecord componentinstanceName- the value for theinstanceNamerecord componentbotAccountName- the value for thebotAccountNamerecord component
-
-
Method Details
-
fromEvent
public static SFLogAppender.SFLogEvent fromEvent(org.apache.logging.log4j.core.LogEvent event, String formatted) -
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. -
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
message
Returns the value of themessagerecord component.- Returns:
- the value of the
messagerecord component
-
timestamp
public long 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
-
instanceId
Returns the value of theinstanceIdrecord component.- Returns:
- the value of the
instanceIdrecord component
-
botAccountId
Returns the value of thebotAccountIdrecord component.- Returns:
- the value of the
botAccountIdrecord component
-
scriptId
Returns the value of thescriptIdrecord component.- Returns:
- the value of the
scriptIdrecord component
-
instanceName
Returns the value of theinstanceNamerecord component.- Returns:
- the value of the
instanceNamerecord component
-
botAccountName
Returns the value of thebotAccountNamerecord component.- Returns:
- the value of the
botAccountNamerecord component
-