yes, xx_log4j.properties is the properties file defined in my IDE classpath.

I tried yr ways, and here is my results:

1- Trial of renaming the the file to log4j.properties (Didn't work):
log4j:ERROR Could not read configuration file [log4j.properties]. 
java.io.FileNotFoundException: log4j.properties (The system cannot find the file 
specified. )   
void java.io.FileInputStream.open(java.lang.String)             
        native code     
void java.io.FileInputStream.<init>(java.lang.String)           
        FileInputStream.java:64         
void org.apache.log4j.PropertyConfigurator.doConfigure(java.lang.String, 
org.apache.log4j.spi.LoggerRepository)                 
        PropertyConfigurator.java:297   
void org.apache.log4j.PropertyConfigurator.configure(java.lang.String)          
        PropertyConfigurator.java:315 0    
[main] INFO  com.rsw.test.MyAppProperty  - Entering application. 140  
[main] DEBUG com.rsw.test.Bar  - Did it again! 140  
[main] WARN  com.rsw.test.MyAppProperty  - Hello world all ante7 fentakes 140  
[main] WARN  com.rsw.test.MyAppProperty  - Hello world all ante7 fentakes 150  
[main] WARN  com.rsw.test.MyAppProperty  - Hello world all ante7 fentakes 150  
[main] INFO  com.rsw.test.MyAppProperty  - Exiting application.         
        void com.rsw.test.MyAppProperty.main(java.lang.String[])                
                MyAppProperty.java:19 
log4j:ERROR Ignoring configuration file [log4j.properties]. 
Process exited with exit code 0.

2- I tried to set the -D options but also didn't work

3- It worked :))), I used the following:
String l_szfull = l_my.getClass().getClassLoader().getResource( 
"xx_log4j.properties").toExternalForm();
// Delete the first 6 characters from the path to delete "file:/"
// Still u will have "drive_name:/whatever/path/u/specify/xx_log4j.properties"
PropertyConfigurator.configure( fullPath.substring( 6 ) );

Thankx a lot Steven, but I feel that there is something wrong I use, as all is using 
log4j & didn't face such problem I don't know why?
anyway it worked, I insisted on writing the code so that others can benifit from it


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

Reply via email to