Bug 54078 - FlashbackAppender: new appender for lost events
Summary: FlashbackAppender: new appender for lost events
Status: NEW
Alias: None
Product: Log4j - Now in Jira
Classification: Unclassified
Component: Appender (show other bugs)
Version: unspecified
Hardware: PC Linux
: P2 enhancement
Target Milestone: ---
Assignee: log4j-dev
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-10-30 21:34 UTC by Lorenzo
Modified: 2012-10-30 21:34 UTC (History)
0 users



Attachments
FlashbackAppender prototype (2.04 KB, text/html)
2012-10-30 21:34 UTC, Lorenzo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Lorenzo 2012-10-30 21:34:21 UTC
Created attachment 29532 [details]
FlashbackAppender prototype

This is a proposal for a generic "appender decorator" that keeps messages that are below the current logger level to print these "lost" events in case of error.

The idea is that in case of error you need as much information as possible to debug the problem and this it usually lost because the log level was too low.

If the problem is hard to reproduce you can not raise the log level after the exception. Even if the problem it's easy to reproduce it could be a waste of time or problematic for production environments.

This is a proof of concept. I used an appender, maybe there are better options. Current implementation uses a couple of hacks to make the configuration as easy as possible.
A lot of obvious features are missing (filters for trigger events, etc.).


I'm starting to use this in a stage/production environment to check its effectiveness.