[logback-user] EventLogger usage

Ralph Goers rgoers at apache.org
Mon Nov 28 15:53:40 CET 2011


The data in the MDC will be associated with every log record you generate.  We use that for the user's login id, the name of the product, the host name, etc. IOW, the things that are constant during the work that is going on.

EventData is for something you want to record in a single log record in addition to the MDC data. So if the user is logging in we have a login event, if they are performing a transfer of money from one account to another then the EventData contains the amount, the transfer-to account number and the transfer-from account number. If they are performing an SSO to another system the EventData would include information about that.

In other words, we use it for Audit logging.

You will notice that EventLogger uses a Marker. This allows us to set up a TurboFilter to always accept those records. We then route them via the EventLogger to their own location, separate from Debug log records.

Unfortunately, their are two major issues we have with this design:
1. The MarkerFilter (actually the Marker itself) is synchronized and becomes a huge bottleneck under load.
2. Logback loses events when it is reconfigured, which really isn't acceptable for audit logging.

Ralph 

On Nov 28, 2011, at 4:19 AM, Yuvaraj Vanarase wrote:

> Hi,
>  
> Not able to understand the connection between MDC and EventLogger (slf4j). What I understood is, instead of doing separate log requests, one can populate EventData object and log the object by EventLogger.
>  
> Anybody could illustrate this concept please?
>  
> Regards,
> Yuvaraj
>  
> Yuvaraj Vanarase,
> Lead Technology – Software
> Phone: +91.20.40262000 Ext 2305|Mobile: +91.9850818870 | http://www.synechron.com
> SYNECHRON - 
> - Top 15 Best IT Employers for 5 consecutive years (link).
> - Celebrating 10 Years!
>  
> _______________________________________________
> Logback-user mailing list
> Logback-user at qos.ch
> http://mailman.qos.ch/mailman/listinfo/logback-user

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.qos.ch/pipermail/logback-user/attachments/20111128/696d9702/attachment.html>


More information about the Logback-user mailing list