- Download the latest and the greatest from Log4J.
- Download the latest and the greatest from Apache Commons Logging.
- Add the libraries to the $CLASSPATH.
- Write a Log4J properties file called
log4j.propertiesand place it in a directory in the $CLASSPATH. - You can now start logging in a class simply obtaining a logger with:
private static final Log log = LogFactory.getLog(YourClass.class);- and using it:
log.info("your logging comment");
Showing posts with label logging. Show all posts
Showing posts with label logging. Show all posts
Thursday, March 22, 2007
Using Apache Commons Logging and Log4j
It's as easy as this:
Subscribe to:
Posts (Atom)