Example usage of log4j including source code.
Note that class files for the example code is not included in any
of the distributed log4j jar files. You will have to add the directory
/dir-where-you-unpacked-log4j/classes
to your classpath
before trying out the examples.
This package's shows how log4j can be used to output log
statements.
- See source code of Trivial.java for a trivial usage
example.
- See source code of Sort.java and
SortAlgo.java to for a slightly
more advanced example.
- See {@link org.apache.log4j.examples.NumberCruncherServer} for a {@link
org.apache.log4j.NDC} based technique to distinguish the log output from
requests from multiple clients.
Last modified: Fri May 5 10:20:04 MDT 2000