Skip to content

jonfreeland/Log4Slack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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}" />
	<IconEmoji value=":ghost:" /> <!-- Include an emoji to add a little character to your message -->
	<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 -->
	<LinkNames value="false" /> <!-- Automatically link @mentions -->
	<Proxy value="http://proxy:8000"/> <!-- Use an outgoing http proxy -->
	<mapping>	<!-- Add custom colors on the attachment -->
		<level value="INFO" />
		<backColor value="SkyBlue" />
	</mapping>
</appender>

About

Simple, asynchronous Slack log4net appender.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 6

Languages