I'm having difficulties configuring log4j with the DOMConfigurator. The problem is basically that the configuration file seems to be ignored. (The sysinternals' Filemon tools makes me believe that the configurator has actually found and read the file but the layout that's displayed isn't what is in the configuration file.
I'm trying to use the "trivial.java" example and have replaced the first few lines of the trivial class with:
import org.apache.log4j.xml.DOMConfigurator; public class Trivial { static Logger cat = Logger.getLogger(Trivial.class.getName());
public static void main(String[] args) {
DOMConfigurator.configure("C:\\temp\\chainsaw2\\logging-log4j\\examples\\src \\trivial\\log4jconfig.xml"); NDC.push("Client #45890");
The log4jconfig.xml file contains:
The example is simple enough. I suggest you try it again replacing configDebug="true" with debug="true"
<?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
<log4j:configuration xmlns:log4j='http://jakarta.apache.org/log4j/' configDebug="true">
-- Ceki G�lc�
For log4j documentation consider "The complete log4j manual"
ISBN: 2970036908 http://www.qos.ch/shop/products/clm_t.jsp
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
