Sorry, this does work.
It was my fault...  In the actual program where it first started doing this, it was 
pointing a different log file than the one I was looking at.  In the little test the 
log file had a syntax error or something.

anyways... sorry for the hassle.

-Chetan desai.


-----Original Message-----
From: Desai, Chetan P [ITS] 
Sent: Wednesday, March 03, 2004 1:42 PM
To: 'Log4J Users List'
Subject: Cannot switch from BasicConfiguration to PropertyConfiguration


If I attempt to switch from Basic to Property, it stops logging. Sorry if its a repeat 
question.

Thanks in advance !
-Chetan desai.



import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import org.apache.log4j.BasicConfigurator;
import org.apache.log4j.PropertyConfigurator;

...

                try
                {
                        // setup logger for initial startup of an app
                        org.apache.log4j.BasicConfigurator.configure();
                        
                        // switch to configured log once the app is started
                        // notice the log entries do not show, unless you comment out 
the line below
                        // on log4j 1.2.8 and commons-logging
                        PropertyConfigurator.configure(args[0]);
                        
                        throw new Error("testing error");
                        
                        
                        
                }
                catch (Throwable e)
                {
                        System.err.println("err out Exception in main: " + e);
                        log.fatal("Exception in main: " + e, e);
                }
                finally
                {
                        System.err.println("err out final exit");
                        log.info("final exit");
                }

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to