Concepts and basics
is the atomic unit of logging data: every act of logging produces one.
Users are typically not required to create log events manually as numerous
handle event construction, unless they are building a custom log implementation/decorator.
Every log event consists of five components:
Levels indicate event severity:
: verbose output, typically disabled in production
non-critical errors that don't affect the normal operation of the application
unexpected errors that may require human attention
critical errors resulting in application shutdown
Timestamp of the event creation. Includes timezone information.
of the log message that may contain placeholders to be filled with values from properties. May be absent in a valid log event.
Arbitrary key-value data with case-sensitive string keys. May be absent in a valid log event.
The error associated with the log event. May be absent in a valid log event.
Log events are effectively immutable: any changes lead to creation of a new event.
class provides a set of special transformation methods:
This ensures thread safety when routing the same event to multiple logs.