atom feed5 messages in org.apache.logging.log4j-userRe: what to log - API questions :)
FromSent OnAttachments
Julius DaviesJun 12, 2008 11:17 am 
Jason IrwinJun 13, 2008 1:54 am 
Christophe ElekJun 13, 2008 4:24 am 
Wim DeblauweJun 15, 2008 11:06 pm 
Bender HeriJun 16, 2008 6:03 am 
Subject:Re: what to log - API questions :)
From:Wim Deblauwe (wim.@gmail.com)
Date:Jun 15, 2008 11:06:29 pm
List:org.apache.logging.log4j-user

Maybe you need to look at AspectJ and Aspect Oriented Programming in general to address this "cross-cutting concern"?

regards,

Wim

2008/6/13 Christophe Elek <cel@ca.ibm.com>:

They are great discussion :) I really enjoy reading them :)

I have one on my own. My goal in IBM Rational is to ensure all products have a consistent set of logging so we can correlate the logs of all the products. Some are legacy products, some are new products.

Developers and Architect always ask me... 'Chris, really, do I have to create the 4 Logger in each of my class and then figure out which logger to call ? This is crazy... Can't I just have an API like this MyComponent.log(String,Exception) ?'

My answer to them is that the component owner must create the API and I see the following API 1) MyComponent.createLogRecord(String messageKey,Object[] parametersMessage,int severity,Throwable exception) 2) MyComponent.error(MyLogRecord) or MyComponent.audit(MyLogRecord) or MyComponent.traceHttp(MyLogRecord)

"Don't just fix the mistakes - fix whatever permitted the mistake in the first place." Charles Fishman