GelfLayout Class |
Namespace: NLog.Layouts
The GelfLayout type exposes the following members.
| Name | Description | |
|---|---|---|
| GelfLayout |
Initializes a new instance of the GelfLayout class.
|
| Name | Description | |
|---|---|---|
| DisableThreadAgnostic |
Disables ThreadAgnosticAttribute to capture ScopeContext-properties from active thread context
| |
| ExcludeEmptyProperties |
Gets or sets the option to exclude null/empty properties from the log event (as JSON)
| |
| ExcludeProperties |
List of property names to exclude when IncludeEventProperties is | |
| GelfFacility |
Gets or sets whether to activate the legacy Graylog Message Facility-field
| |
| GelfFields |
Gets or sets GELF additional fields
| |
| GelfFullMessage |
Gets or sets the Graylog Message Full-Message-field
| |
| GelfHostName |
Gets or sets Graylog Message Host-field
| |
| GelfShortMessage |
Gets or sets the Graylog Message Short-Message-field
| |
| IncludeEventProperties |
Gets or sets the option to include all properties from the log events
| |
| IncludeProperties |
List of property names to include when IncludeEventProperties is | |
| IncludeScopeProperties |
Gets or sets whether to include the contents of the ScopeContext properties-dictionary.
| |
| Layouts |
Gets the inner layouts.
(Inherited from CompoundLayout.) | |
| LoggingConfiguration |
Gets the logging configuration this target is part of.
(Inherited from Layout.) |
| Name | Description | |
|---|---|---|
| CloseLayout |
Closes the layout.
(Overrides CompoundLayoutCloseLayout.) | |
| GetFormattedMessage |
Renders formatted output using the log event as context.
(Overrides CompoundLayoutGetFormattedMessage(LogEventInfo).) | |
| InitializeLayout |
Initializes the layout.
(Overrides CompoundLayoutInitializeLayout.) | |
| Precalculate |
Precalculates the layout for the specified log event and stores the result
in per-log event cache.
Skips context capture when Layout have [ThreadAgnostic], and only contains layouts with [ThreadAgnostic].
(Inherited from Layout.) | |
| Render(LogEventInfo) |
Renders formatted output using the log event as context.
(Inherited from Layout.) | |
| Render(LogEventInfo, StringBuilder) |
Optimized version of Render(LogEventInfo) that works best when
override of RenderFormattedMessage(LogEventInfo, StringBuilder) is available.
(Inherited from Layout.) | |
| RenderFormattedMessage |
Renders formatted output using the log event as context.
(Overrides CompoundLayoutRenderFormattedMessage(LogEventInfo, StringBuilder).) | |
| ResolveServiceT |
Resolve from DI ServiceRepository (Inherited from Layout.) | |
| ToString | Returns a string that represents the current object. (Inherited from CompoundLayout.) |
{ "version": "1.1", "host": "example.org", "short_message": "A short message that helps you identify what is going on", "full_message": "Backtrace here\n\nmore stuff", "timestamp": 1385053862.3072, "level": 1, "_user_id": 9001, "_some_info": "foo", "_some_env_var": "bar" }