You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by "Sanjay Gupta (sanjaygu)" <sa...@cisco.com> on 2003/08/18 23:23:14 UTC

How to use custom property file

Hi,

There is a log4j.xml in the classpath and I don't want my log4j instance
to initialize with it. Instead I want to use my_log4j.xml. How do I
prevent log4j from reading log4j.xml? Here is a piece of code I am
trying. It reads both log4j.xml as well as my_log4j.xml.
 
  public static void main(String[] args) { 
       if(args.length==1){
	
DOMConfigurator.configure("D:\\Logwriter\\my_log4j.xml");
        } else {
        	System.out.println("WARNING-no conf files
specified...looking for log4j.properties or log4j.xml in classpath");
        }

 }


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-user-help@jakarta.apache.org