J F W

making web application programming easier is possible

HOW TO : WEBAPP

log4j.xml

The configuration of log4j is held in two files:

  1. In log4j.xml: This is the standard configuration file of Log4J.
  2. In jfw.properties: This is the configuration file of JFW. See "HOW TO : WEBAPP > jfw.properties".
Here is the part of log4j.xml to edit:

The value of param "File" is the path and the name of the log file. If the path does not exist it has to be created manually.

Also a logger has to be defined:

The name of the logger ("file" in this example) will be used in jfw.properties.

If you use the daily rolling appender (as in the previous example) you can use the class CleanOldFiles for deleting the old log files. See "HOW TO : WEBAPP > jfw.properties".