Skip to content

Latest commit

 

History

History
18 lines (15 loc) · 956 Bytes

README.md

File metadata and controls

18 lines (15 loc) · 956 Bytes

Log4Slack

Simple, asynchronous Slack log4net appender. Grab the NuGet package here.

Example Log4Slack output

<appender name="SlackAppender" type="Log4Slack.SlackAppender, Log4Slack">
	<WebhookUrl value="https://{your company}.slack.com/services/hooks/incoming-webhook?token={your token}" /> <!-- Your Slack webhook URL -->
	<Channel value="#testing" /> <!-- Your Slack channel to post to -->
	<Username value="Log4Slack" /> <!-- The username to post as -->
	<IconUrl value="{your icon url}" />
	<AddAttachment value="true" /> <!-- Include an attachment on the Slack message with additional details -->
	<AddExceptionTraceField value="true" /> <!-- If an exception occurs, add its trace as a field on the message attachment -->
	<UsernameAppendLoggerName value="true"/> <!-- Append the current logger name to the Slack username -->
</appender>