Skip to content
This repository is currently being migrated. It's locked while the migration is in progress.

ZopaPublic/Log4NetHipChatAppender

Repository files navigation

#Log4Net HipChat Appender

This appender will write log4net log messages to HipChat through their public api. This project is heavily inspired by hatchet-hipchat

##Configuration

As is common with all log4net appenders this can be configured using an xml a basic configuration might look like.

<appender name="HipChatAppender" type="Log4NetHipChatAppender.Appender, Log4NetHipChatAppender">
  <layout type="log4net.Layout.PatternLayout">
    <conversionPattern value="%logger - %message"/>
  </layout>
  <AuthToken value="YOUR_AUTH_KEY" />
  <RoomId value="YOUR_ROOM" />
  <SenderName value="YOUR_LOGGER" />
</appender>

There are a number of required values

  • AuthToken (string) - The api key from HipChat
  • RoomId (string) - The room for the messages to be logged to
  • SenderName (string) - The name which the messages will appear from

And optionally

  • UseEmotions (boolean - default:False) - To enable emotions as detailed below
  • Content DEBUG
  • Wat INFO
  • Oh crap WARN
  • Oh my god ERROR
  • Boom FATAL
  • Notify (boolean - default:False) - To ensure the message is sent with a notification to HipChat users in the room
  • Synchronous (boolean - default:False) - Ensures that the main application thread is not blocked by running messages through a background thread.

Known issues

When running in Asynchronous mode in order to prevent blocking the working thread with a web request this appender will create a background child thread, so log messages may be logged in an indeterminate order.

About

Hipchat appender for log4net

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published