Click or drag to resize

MicrosoftConsoleJsonLayout Class

Renders output that simulates Microsoft Json Console Formatter from AddJsonConsole
Inheritance Hierarchy
SystemObject
  NLog.LayoutsLayout
    NLog.LayoutsJsonLayout
      NLog.Extensions.LoggingMicrosoftConsoleJsonLayout

Namespace:  NLog.Extensions.Logging
Assembly:  NLog.Extensions.Logging (in NLog.Extensions.Logging.dll) Version: 5.3.13+9106fa3b6a3bdf3fbae3d40dbd52b6c23eb3b9f3
Syntax
public class MicrosoftConsoleJsonLayout : JsonLayout

The MicrosoftConsoleJsonLayout type exposes the following members.

Constructors
  NameDescription
Public methodMicrosoftConsoleJsonLayout
Initializes a new instance of the MicrosoftConsoleJsonLayout class.
Top
Properties
  NameDescription
Public propertyAttributes
Gets the array of attributes' configurations.
(Inherited from JsonLayout.)
Public propertyEscapeForwardSlash
Should forward slashes be escaped? If true, / will be converted to \/
(Inherited from JsonLayout.)
Public propertyExcludeEmptyProperties
Gets or sets the option to exclude null/empty properties from the log event (as JSON)
(Inherited from JsonLayout.)
Public propertyExcludeProperties
List of property names to exclude when IncludeAllProperties is true
(Inherited from JsonLayout.)
Public propertyIncludeEventProperties
Gets or sets the option to include all properties from the log event (as JSON)
(Inherited from JsonLayout.)
Public propertyIncludeGdc
Gets or sets a value indicating whether to include contents of the GlobalDiagnosticsContext dictionary.
(Inherited from JsonLayout.)
Public propertyIncludeScopeProperties
Gets or sets whether to include the contents of the ScopeContext dictionary.
(Inherited from JsonLayout.)
Public propertyIncludeScopes
Gets or sets whether to include "scopes"-section
Public propertyIndentJson
Auto indent and create new lines
(Inherited from JsonLayout.)
Protected propertyLoggingConfiguration
Gets the logging configuration this target is part of.
(Inherited from Layout.)
Public propertyMaxRecursionLimit
How far should the JSON serializer follow object references before backing off
(Inherited from JsonLayout.)
Public propertyRenderEmptyObject
Gets or sets the option to render the empty object value {}
(Inherited from JsonLayout.)
Public propertyStateAttributes
Gets the array of attributes for the "state"-section
Public propertySuppressSpaces
Gets or sets the option to suppress the extra spaces in the output json
(Inherited from JsonLayout.)
Public propertyTimestampFormat
Gets or sets whether to include "Timestamp"-section
Top
Methods
  NameDescription
Protected methodCloseLayout
Closes the layout.
(Inherited from JsonLayout.)
Protected methodGetFormattedMessage
Renders formatted output using the log event as context.
(Inherited from JsonLayout.)
Protected methodInitializeLayout
Initializes the layout.
(Inherited from JsonLayout.)
Public methodPrecalculate
Precalculates the layout for the specified log event and stores the result in per-log event cache. Only if the layout doesn't have [ThreadAgnostic] and doesn't contain layouts with [ThreadAgnostic].
(Inherited from Layout.)
Public methodRender(LogEventInfo)
Renders formatted output using the log event as context.
(Inherited from Layout.)
Public methodRender(LogEventInfo, StringBuilder)
Optimized version of Render(LogEventInfo) that works best when override of RenderFormattedMessage(LogEventInfo, StringBuilder) is available.
(Inherited from Layout.)
Protected methodRenderFormattedMessage
Renders formatted output using the log event as context.
(Inherited from JsonLayout.)
Protected methodResolveServiceT
Resolve from DI ServiceRepository
(Inherited from Layout.)
Public methodToString
Returns a string that represents the current object.
(Inherited from JsonLayout.)
Top
See Also