Class LogEvent
java.lang.Object
com.soklet.core.LogEvent
An informational "loggable" event that occurs during Soklet's internal processing - for example, if an error occurs while handling a request.
These events are exposed via LifecycleInterceptor.didReceiveLogEvent(LogEvent)
.
Documentation is available at https://www.soklet.com/docs/request-lifecycle#event-logging.
- Author:
- Mark Allen
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Builder used to construct instances ofLogEvent
viawith(LogEventType, String)
.static class
-
Method Summary
Modifier and TypeMethodDescriptioncopy()
Vends a mutable copier seeded with this instance's data, suitable for building new instances.boolean
The type of log event this is.The response associated with this log event, if available.The message for this log event.The request associated with this log event, if available.The Resource Method associated with this log event, if available.The throwable for this log event, if available.int
hashCode()
toString()
static LogEvent.Builder
with
(LogEventType logEventType, String message) Acquires a builder forLogEvent
instances.
-
Method Details
-
with
@Nonnull public static LogEvent.Builder with(@Nonnull LogEventType logEventType, @Nonnull String message) Acquires a builder forLogEvent
instances.- Parameters:
logEventType
- what kind of log event this ismessage
- the message for this log event- Returns:
- the builder
-
copy
Vends a mutable copier seeded with this instance's data, suitable for building new instances.- Returns:
- a copier for this instance
-
toString
-
equals
-
hashCode
-
getLogEventType
The type of log event this is.- Returns:
- the log event type
-
getMessage
-
getThrowable
The throwable for this log event, if available.- Returns:
- the throwable, or
Optional.empty()
if not available
-
getRequest
The request associated with this log event, if available.- Returns:
- the request, or
Optional.empty()
if not available
-
getResourceMethod
The Resource Method associated with this log event, if available.- Returns:
- the Resource Method, or
Optional.empty()
if not available
-
getMarshaledResponse
The response associated with this log event, if available.- Returns:
- the response, or
Optional.empty()
if not available
-