Example code for log4j to viewed in conjunction with the {@link
examples.SortAlgo SortAlgo} class.
This program expects a configuration file name as its first
argument, and the size of the array to sort as the second and last
argument. See its source
code for more details.
Play around with different values in the configuration file and
watch the changing behavior.
Example configuration files can be found in sort1.properties, sort2.properties, sort3.properties and sort4.properties are supplied with the
package.
If you are also interested in logging performance, then have
look at the {@link org.apache.log4j.performance.Logging} class. |