Home » Uncategorized

Syndicated Logging

4 May 2005 133 Views No Comment

In enterprise applications, system failure notification is often mission critical. If an application or a computer system fails to respond, or an application produces an unrecoverable failure, human intervention may be required.

Notification can be accomplished in many ways. An error message can be captured in a log file, e-mailed to an individual or a mailing list, or even sent as a text message to an application support team. These technologies all have advantages and disadvantages. For example, anybody who needs to access a log file could probably get it, but it is difficult to see what error messages have already been viewed and it is easy to forget to regularly check the log file.

Another way to distribute notification of application errors is to syndicate them using an XML-based syndication format such as RSS or Atom. Electronic syndication has become quite popular in the last year or so. Many news sites, Weblogs, and online content providers use syndication to provide people with updates to their content. In order to access the data in an RSS feed, a user needs to use a program that is capable of reading the syndicated feed. These programs are often called news aggregators or feed readers.

I’ve setup a working implementation using log4j and RSS. I created a custom log4j appender named RssAppender that converts the error messages into RSS item elements that are appended to a file. Then, I created an RssPublisher, which runs a background thread that takes the items that the RssAppender outputs, tacks on the necessary XML before and after the items, then publishes the complete feed to a Web server.

What are the benefits of using syndication to notify people of error messages in your application?

* Feeds can be made accessible from anywhere on the Web (or on an Intranet)
* Subscription to a feed is handled by the receiver rather than the sender, thus the subscription process is simpler and nobody needs to maintain a list of subscribers
* Subscribers can choose to use whatever feed-reading software they want
* Depending on the software subscribers use, they can choose their own update frequency
* Errors can be displayed as discrete items, so users can see which errors they have read and which ones they haven’t
* Multiple feeds can be produced to display various levels of error, allowing people to subscribe to the levels that they are interested in
* People can subscribe to several feeds from different applications within their feed aggregator, allowing them to have a combined view of errors across multiple applications
* Syndicated feeds can be integrated with existing content-reading technologies such as e-mail, scrolling news tickers, or sms-messaging systems

Here are some resources you can use to get started:

* Set Up a Simple Syndication Feed Using RSS
* Learn to Consume RSS Using DevX’s New Content Feeds
* RSS Resources
* What is RSS?
* Software keeps track of Weblog, news-site updates
* Log4j

Leave your response!

Add your comment below, or trackback from your own site. You can also subscribe to these comments via RSS.

Be nice. Keep it clean. Stay on topic. No spam.

You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

This is a Gravatar-enabled weblog. To get your own globally-recognized-avatar, please register at Gravatar.