Skip to content

Instantly share code, notes, and snippets.

@clabnet
Created February 4, 2019 10:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save clabnet/4062abb25c2b46dd96036ab25fe005fd to your computer and use it in GitHub Desktop.
Save clabnet/4062abb25c2b46dd96036ab25fe005fd to your computer and use it in GitHub Desktop.
Logstash NLog Target
<target name="logstash" xsi:type="Network" address="tcp://host:port" newLine="true">
<layout xsi:type="JsonLayout" includeAllProperties="false">
<attribute name="@timestamp" layout="${date:format=yyyy-MM-ddTHH\:mm\:ss.fffZ}" />
<attribute name="level" layout="${level:upperCase=true}"/>
<attribute name="category" layout="${logger}" />
<attribute name="message" layout="${message}" />
<attribute name="environment" layout="production" />
<attribute name="extra" layout="value" />
</layout>
</target>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment