Log Context
Overview
When any log message is generated, a Log Context instance is generated. It contains important information about the log call that can be used to construct the log message.
Fields
Field | Type | Description |
---|---|---|
|
| Timestamp when the log message was created. |
|
| Log level information associated with the log message. |
|
| Source label for the logger where the log message originated. |
|
| Line number in the source code where the log message was generated. |
|
| Full class name from which the log message originated. |
|
| Method name from which the log message originated. |
|
| Log message. |
|
| List of StackFrames from the log StackTrace. |
Generation
When any logger is called, this context will be generated. Most of the fields are self explanatory, but here are some details:
LogLevel
The LogLevelDetails are obtained depending on the log level provided in the Log call. These will match the LogLevels configured in the Project Settings.
Stackframes
The logger will capture every stack frame in the log call to generate a call stack. This can be included in the LogFormat as a tag and configured per log level.
Additionally, it's possible to hide a method from the generated call stack by using the [HideInCallstack] attribute.
Last updated