eventFrom

open fun eventFrom(context: String? = null, level: Level, throwable: Throwable? = null, eventObject: Any? = null, contextItems: EventItems = mapOf()): LogEvent

Construct a LogEvent from a range of types.

  • If the object is an event already, update it with level, stack trace (if present) and context items.

  • Otherwise, construct an event with supplied information.

Return

a new LogEvent from specified components

Parameters

context

optional context for the event

level

logging level for the event

throwable

optional Throwable associated with the event

eventObject

optional object that might already be a LogEvent

contextItems

map of context items to include in the new event