|
Project Information
Links
|
Log4J Twitter AppenderIt is useful to log error messages to a mobile device so that errors in your production servers can be quickly resolved. Twitter is a great way to keep up to date with your other interests so why not your server logs? In HiveSight we did just that. Here is an implementation of a Lo4J Appender that sends log messages to your Twitter. Here is an example of how it is added as an appender using a ''log4j.properties'' file: log4j.rootLogger=INFO, TWITTER log4j.appender.TWITTER=com.hivesight.infra.log4j.TwitterAppender log4j.appender.TWITTER.username=[your twitter username] log4j.appender.TWITTER.password=[your twitter password] log4j.appender.TWITTER.urlTemplate=http://twitter.com/statuses/update.xml log4j.appender.TWITTER.layout=org.apache.log4j.PatternLayout log4j.appender.TWITTER.layout.ConversionPattern=%d %-5p %c %x - %m%n log4j.appender.TWITTER.Threshold=ERROR Two things you should be aware of before using this:
Source Code is available from Subversion. You can also view it here |