Skip to content

Conversation

@mckn
Copy link

@mckn mckn commented Mar 23, 2015

The following work has been done:

  • Updated dependencies to newest version.
  • Converter uppdated to support new 1.1 specification
  • Converter can now handle deep objects as extras. They are flattened out and added as _fields.
  • You can now also choose to use an dns name for the graylog host instead of a ip.
  • Added so you can use layout-renderers in hostip and hostport. See example below:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <configSections>
    <section name="nlog" type="NLog.Config.ConfigSectionHandler, NLog"/>
  </configSections>
  <appSettings>
    <add key="graylogHostip" value="ip-here" />
    <add key="graylogHostport" value="port-here" />
  </appSettings>

  <nlog>
    <extensions>
      <add assembly="NLog.Extended" />
      <add assembly="Gelf4NLog.Target"/>
    </extensions>

      <target name="graylog"
              type="graylog"
              hostip="${appsetting:name=graylogHostip}"
              hostport="${appsetting:name=graylogHostport}" />
    </targets>

    <rules>
      <logger name="*" minlevel="Info" writeTo="graylog" />
    </rules>
  </nlog>

</configuration>

Best regards,
Marcus

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant