Skip to content

Instantly share code, notes, and snippets.

@gsherman
Created December 16, 2015 16:52
Show Gist options
  • Save gsherman/e6e65d569d0ab0e4b989 to your computer and use it in GitHub Desktop.
Save gsherman/e6e65d569d0ab0e4b989 to your computer and use it in GitHub Desktop.
partial log4net config showing a UDP appender
<appender name="LogStashAppender" type="log4net.Appender.UdpAppender">
<remoteAddress value="logserver.mycompany.com" />
<remotePort value="9410" />
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%utcdate{ISO8601} || %level || %P{log4net:HostName} || prod || AppNameGoesHere|| %identity || %aspnet-request{PATH_INFO} || %logger || %message"/>
</layout>
</appender>
<root>
<level value="DEBUG" />
<appender-ref ref="RollingFileAppender" />
<appender-ref ref="LogStashAppender" />
</root>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment