This week's book giveaway is in the Other Open Source APIs forum. We're giving away four copies of Storm Applied and have Sean Allen, Peter Pathirana & Matthew Jankowski on-line! See this thread for details.
Hi, The application I work with has its own logging system which is very similar to Log4J. I have been asked to see if I can add function to the logging system so that logging not only varies in levels (debug, warning, error etc) but also in different application section. i.e. I can then have debug mode for section1, warning mode for section2 etc. I am thinking of having a hashtable or something similar to hold the section indicator with its only logging switch. Is there a better idea? Or is there any product thats already doing this I can download? Also, is it advisable to switch to Log4J since its more of a standard? Thanks in advance!
If you have packaged your application to support it, you can do this in Log4J. eg set com.domain.application.database and everything under it to INFO set com.domain.application.business and everything under it to WARN set com.domain.application.presentation and everything under it to ERROR As long as the code for these section are contained under the package, you've accomplished your goal. Dave
Where I'm working, they asked me to do some maintenance work on the in-house logging framework. I kept only the API from the legacy logging framework, turning it into a Log4J wrapper. We gained a lot of functionality v quickly by doing that. So I recommend replacing what you currently have with Log4J.
Christopher Farnham<br />Boston, MA<p>"Perfect is the Enemy of Good"