Package burp.mcp.util
Record Class LogEntry
java.lang.Object
java.lang.Record
burp.mcp.util.LogEntry
public record LogEntry(String timestamp, String level, String source, String correlationId, long elapsedMs, String message, String throwableSummary)
extends Record
Structured log entry capturing all context for a single log event.
Timerange: timestamp is ISO 8601 with milliseconds.
Correlation IDs tie tool calls to their parent server requests.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecorrelationIdrecord component.static LogEntrycreate(String level, String source, String correlationId, long elapsedMs, String message, Throwable t) longReturns the value of theelapsedMsrecord 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.message()Returns the value of themessagerecord component.source()Returns the value of thesourcerecord component.Returns the value of thethrowableSummaryrecord component.Returns the value of thetimestamprecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
LogEntry
public LogEntry(String timestamp, String level, String source, String correlationId, long elapsedMs, String message, String throwableSummary) Creates an instance of aLogEntryrecord class.- Parameters:
timestamp- the value for thetimestamprecord componentlevel- the value for thelevelrecord componentsource- the value for thesourcerecord componentcorrelationId- the value for thecorrelationIdrecord componentelapsedMs- the value for theelapsedMsrecord componentmessage- the value for themessagerecord componentthrowableSummary- the value for thethrowableSummaryrecord component
-
-
Method Details
-
create
-
toJsonLine
-
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 '=='. -
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
-
source
Returns the value of thesourcerecord component.- Returns:
- the value of the
sourcerecord component
-
correlationId
Returns the value of thecorrelationIdrecord component.- Returns:
- the value of the
correlationIdrecord component
-
elapsedMs
public long elapsedMs()Returns the value of theelapsedMsrecord component.- Returns:
- the value of the
elapsedMsrecord component
-
message
Returns the value of themessagerecord component.- Returns:
- the value of the
messagerecord component
-
throwableSummary
Returns the value of thethrowableSummaryrecord component.- Returns:
- the value of the
throwableSummaryrecord component
-