![]() | SplunkLayout Class |
Namespace: NLog.Layouts
The SplunkLayout type exposes the following members.
Name | Description | |
---|---|---|
![]() | SplunkLayout |
Initializes a new instance of the SplunkLayout class.
|
Name | Description | |
---|---|---|
![]() | Attributes |
Gets the array of attributes' configurations.
(Inherited from JsonLayout.) |
![]() | 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 |
![]() | IncludeEventProperties |
Gets or sets the option to include all properties from the log events
|
![]() | IncludeGdc |
Gets or sets a value indicating whether to include contents of the GlobalDiagnosticsContext dictionary.
(Inherited from JsonLayout.) |
![]() | IncludeScopeProperties |
Gets or sets whether to include the contents of the ScopeContext properties-dictionary.
|
![]() | IndentJson |
Auto indent and create new lines
(Inherited from JsonLayout.) |
![]() | LoggingConfiguration |
Gets the logging configuration this target is part of.
(Inherited from Layout.) |
![]() | MaxRecursionLimit |
How far should the JSON serializer follow object references before backing off
(Inherited from JsonLayout.) |
![]() | RenderEmptyObject |
Gets or sets the option to render the empty object value {}
(Inherited from JsonLayout.) |
![]() | SplunkFields |
Gets the array of attributes for the "event"-section
|
![]() | SplunkHostName |
Gets or sets Splunk Message Host-attribute
|
![]() | SplunkIndex |
Gets or sets Splunk Message Index-attribute, that controls which event data is to be indexed.
|
![]() | SplunkSourceName |
Gets or sets Splunk Message Source-attribute. Example the name of the application.
|
![]() | SplunkSourceType |
Gets or sets Splunk Message SourceType-attribute. SourceType can be used hint for choosing Splunk Indexer
|
![]() | SuppressSpaces |
Gets or sets the option to suppress the extra spaces in the output json.
(Inherited from JsonLayout.) |
Name | Description | |
---|---|---|
![]() | CloseLayout |
Closes the layout.
(Inherited from JsonLayout.) |
![]() | GetFormattedMessage |
Renders formatted output using the log event as context.
(Inherited from JsonLayout.) |
![]() | InitializeLayout |
Initializes the layout.
(Overrides JsonLayoutInitializeLayout.) |
![]() | 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.
(Inherited from JsonLayout.) |
![]() | ResolveServiceT |
Resolve from DI ServiceRepository (Inherited from Layout.) |
![]() | ToString | Returns a string that represents the current object. (Inherited from JsonLayout.) |
{ "time": 1426279439, // epoch time "host": "localhost", "source": "random-data-generator", "sourcetype": "my_sample_data", "index": "main", "event": { "message": "Something happened", "level": "Info" } }