| From | Sent On | Attachments |
|---|---|---|
| Julius Davies | Jun 12, 2008 11:17 am | |
| Jason Irwin | Jun 13, 2008 1:54 am | |
| Christophe Elek | Jun 13, 2008 4:24 am | |
| Wim Deblauwe | Jun 15, 2008 11:06 pm | |
| Bender Heri | Jun 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)
What do you think the minimal set of API should be ? Or should we force our developers to become expert of Log4J ? I know I can explain to them the value of logging, the value of software engineering, quality of code...and so on... but seriously, If we come up with a very simple set of API...wouldn't that make this discussion between the developer and me easier ? Christophe Elek - Senior Software Analyst IBM Rational Serviceability Architect IBM Toronto Lab 8200 Warden Avenue, Markham, Ontario, L6G 1C7 Phone Number: (905) 413-3467 Email: cel...@ca.ibm.com
"Don't just fix the mistakes - fix whatever permitted the mistake in the first place." Charles Fishman





