Skip to content

Instantly share code, notes, and snippets.

@ericdagenais
Created February 10, 2013 14:18
Show Gist options
  • Save ericdagenais/4749707 to your computer and use it in GitHub Desktop.
Save ericdagenais/4749707 to your computer and use it in GitHub Desktop.
Sample GelfUdpAppender and RemoteSyslogAppender configuration
<appender name="GelfUdpAppender" type="Gelf4net.Appender.GelfUdpAppender, Gelf4net">
<remoteAddress value="graylog2.address"/>
<remotePort value="12201"/>
<layout type="Gelf4net.Layout.GelfLayout, Gelf4net">
<param name="AdditionalFields" value="app:AppName,version:trunk,Level:%level,Logger:%logger,Thread:%thread,Exception:%exception" />
<param name="Facility" value="AppName"/>
<param name="IncludeLocationInformation" value="true"/>
</layout>
</appender>
<appender name="RemoteSyslogAppender" type="log4net.Appender.RemoteSyslogAppender">
<layout type="log4net.Layout.PatternLayout" value="%date{dd/MM/yyyy hh:mm:ss,fff} | %thread | %level | %logger | %username | %P{log4net:HostName} | dev | %message | %exception | "/>
<identity value="AppName" />
<remoteAddress value="graylog2.address" />
<filter type="log4net.Filter.LevelRangeFilter">
<levelMin value="ALL" />
</filter>
</appender>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment