Skip to content
Rolf Kristensen edited this page Jul 2, 2025 · 3 revisions

A specialized layout that renders to Graylog Extended Log Format (GELF) which produces JSON output.

Platforms Supported: All - Requires nuget-package NLog.Targets.Network

<target name="jsonFile" xsi:type="File" fileName="gelf-file.json" >
      <layout xsi:type="GelfLayout" includeEventProperties="Boolean" excludeProperties="Comma-separated list (string)">
              <GelfField name="threadid" layout="${threadid}" />
       </layout>
</target>

Layout Options

  • GelfHostName - Graylog Message Host-field. Default = ${hostname}

  • GelfShortMessage - Graylog Message Short-Message-field (Truncates when longer than 250 chars). Default = ${message}

  • GelfFullMessage - Graylog Message Full-Message-field. Default = ${message}

  • GelfFacility - Legacy Graylog Message Facility-field. Default = null

  • IncludeEventProperties - Include all properties from the log events. Default = true.

  • IncludeScopeProperties - Include all scope-properties from the ScopeContext. Default = false.

  • ExcludeEmptyProperties - Exclude null/empty properties. Default = false.

  • ExcludeProperties - Comma separated string with names which properties to exclude.

  • IncludeProperties - Comma separated string with names which properties to explicitly include.

  • GelfField

    • name - Required. The name of the JSON-key
    • layout - The layout for the JSON-value (Can be a nested JsonLayout)
Clone this wiki locally
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy