[logback-dev] Twitter Appender?

Ceki Gulcu ceki at qos.ch
Wed Aug 5 12:03:04 CEST 2009


Hi Joern,

TwitterAppender does make sense.

As a use case, imagine an application problem represented by a logging
event of level ERROR. The logging event is sent to TwitterAppender
which tweets (posts a tweeter message) under the account of Alice, a
dedicated (non-human) tweeter user. Relevant system administrators,
followers of Alice, would see her tweets and take whatever necessary
steps are required to respond to the error message. They could do so
using a tweeter client on a smart phone, for example "tweetie" [1].

You could prevent flooding by limiting the number of tweets per time
frame, say at most once an hour. I actually have code lying somewhere
which does this using a sophisticated algorithm. Consider flooding
as a solved problem.

Evaluators, in particular JaninoEvalurators, could be used to filter
out certain messages from triggering tweets. Tweets of confidential
log messages could be avoided assuming the said log messaged contained
a special marker, say CONFIDENTIAL.

The contents of the tweets could be formatted using a PatternLayout
similar to the way SMTPAppender formats the subject of the outgoing
email message.

How about building a prototype of TweeterAppender?

[1] http://www.atebits.com/tweetie-iphone/

Joern Huxhorn wrote:
> Hi guys,
> 
> I'm using Twitter4J on another small project and I was wondering if a 
> TwitterAppender would make sense.
> 
> I'd obviously only do something in case of an error to prevent too much 
> tweets followed by a ban of the user.
> I would have the benefit (at least foe ppl like me that get tweets 
> pushed to their phone ;)) that I would get informed immediately if 
> something really bad happens.
> 
> I'm just brainstorming here but I'd like to hear other ppls opinions on 
> the case.
> The Appender would have a dedicated Twitter user. Twitter user and 
> password would be set in the config.
> Additionally, a list of Twitter usernames would be provided.
> Those would receive a reply (or a DM?) in case of an error.
> 
> Some questions that jump to my mind:
> What should the actual message contain? We only have 
> 140-username.length()-2 characters.
> Messages shouldn't contain anything confidential...
> Messages must not be the same all the time. They need to differ, 
> otherwise they will be ignored by Twitter.
> How should flooding be prevented if the app keeps producing errors (this 
> would ban the twitter user, otherwise)
> 
> Ideas, Suggestions, Bashing? ;)
> 
> Joern.
> 

-- 
Ceki Gülcü
Logback: The reliable, generic, fast and flexible logging framework for Java.
http://logback.qos.ch


More information about the logback-dev mailing list