Click or drag to resize

SyslogLayout Class

A specialized layout that renders Syslog-formatted events in format Rfc3164 / Rfc5424
Inheritance Hierarchy
SystemObject
  NLog.LayoutsLayout
    NLog.LayoutsCompoundLayout
      NLog.LayoutsSyslogLayout

Namespace:  NLog.Layouts
Assembly:  NLog.Targets.Network (in NLog.Targets.Network.dll) Version: 6.0.0+be83582280f7a841b0d3c6ae75b4f95aaf07e914
Syntax
public class SyslogLayout : CompoundLayout

The SyslogLayout type exposes the following members.

Constructors
  NameDescription
Public methodSyslogLayout
Initializes a new instance of the SyslogLayout class.
Top
Properties
  NameDescription
Public propertyDisableThreadAgnostic
Disables ThreadAgnosticAttribute to capture volatile LogEvent-properties from active thread context
Public propertyIncludeEventProperties
Gets or sets a value indicating whether LogEvent Properties should be included for StructuredData when Rfc5424 =
Public propertyLayouts
Gets the inner layouts.
(Inherited from CompoundLayout.)
Protected propertyLoggingConfiguration
Gets the logging configuration this target is part of.
(Inherited from Layout.)
Public propertyRfc3164
Gets or sets a value indicating whether to use RFC 3164 for Syslog Format
Public propertyRfc5424
Gets or sets a value indicating whether to use RFC 5424 for Syslog Format
Public propertyStructuredDataId
Gets or sets the prefix for StructuredData when Rfc5424 =
Public propertyStructuredDataParams
List of StructuredData Parameters to include when Rfc5424 =
Public propertySyslogAppName
Name of the device / application / process sending the Syslog-message (Optional)
Public propertySyslogFacility
Device Facility
Public propertySyslogHostName
The FQDN or IPv4 address or IPv6 address or hostname of the sender machine (Optional)
Public propertySyslogLevel
Message Severity
Public propertySyslogMessage
Mesage Payload
Public propertySyslogMessageId
The type of message that should be the same for events with the same semantics. Ex ${event-properties:EventId} (Optional)
Public propertySyslogProcessId
Process Id or Process Name or Logger Name (Optional)
Public propertySyslogTimestamp
Gets or sets a value indicating what DateTime format should be used when Rfc5424 =
Top
Methods
  NameDescription
Protected methodCloseLayout
Closes the layout.
(Overrides CompoundLayoutCloseLayout.)
Protected methodGetFormattedMessage
Renders formatted output using the log event as context.
(Overrides CompoundLayoutGetFormattedMessage(LogEventInfo).)
Protected methodInitializeLayout
Initializes the layout.
(Overrides CompoundLayoutInitializeLayout.)
Public methodPrecalculate
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.)
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.
(Overrides CompoundLayoutRenderFormattedMessage(LogEventInfo, StringBuilder).)
Protected methodResolveServiceT
Resolve from DI ServiceRepository
(Inherited from Layout.)
Public methodToString
Returns a string that represents the current object.
(Inherited from CompoundLayout.)
Top
Remarks
See Also