Logging Strategy/best practice



Hi there,

I am working on a startup J2EE project: JBoss, Spring, Hibernate etc.
One of my responsibilities is to set up the "logging".

I have chosen to use log4j, or more precisely was nudged in that
direction. I've used it before on smaller projects with no problems;
basically a log4j.properties file defining various categories,
appenders and layouts. This approach seems a bit shallow for a larger
project i.e. 100s+ of classes - maybe I'm wrong.....

Questions:

1. Is log4j a suitable solution for this environment?
2. Any URLs for logging best practices/patterns. Here I am thinking
about something more involved than a "Log4j 101" article.
3. Anything else I should consider?

Cheers for yer time

Lord0

.



Relevant Pages

  • Error loading log4j properties file
    ... I am using log4j for logging, ... HOWEVER, if I restart tomcat, everything works fine, I get no errors, ... log4j:ERROR Could not read configuration file from URL ... log4j:WARN Please initialize the log4j system properly. ...
    (comp.lang.java.programmer)
  • Logging APIs
    ... I'm familiar with Log4J, I've read about Java 1.4 Logging, used ... Commons logging to sit on top of Log4J (and read an interesting ... the Avalon logging API. ...
    (comp.lang.java.programmer)
  • log4j vs. java 1.4 logging performance
    ... but OptimizeIt (Borland's code profiler) complains that ... log4j is creating too many strings. ... This problem occurs when I turn logging ...
    (comp.lang.java.programmer)
  • Re: Current thinking on logging?
    ... I have found quite a bit on the web discussing Log4j vs JDK logging vs Commons Logging. ... Everything I read says log4j is better, but we ship a commercial app, and I really don't want to include yet another .jar file. ...
    (comp.lang.java.programmer)
  • Re: log4j vs. java 1.4 logging performance
    ... > log4j is creating too many strings. ... > logging to it's lowest levels. ... To avoid the parameter construction cost write: ...
    (comp.lang.java.programmer)