hi all,
i'm trying to use org.apache.commons.logging package in stand alone
swing application. can some one please tell me where should i place the
log4j.properties file so that i can use that for logging
configurations. also is there any mechanism by which i can tell the api
where my log4j.proerties file is located. please advice
thanx
Chanchal
Jean-Francois Briere - 05 Dec 2005 20:40 GMT
Hi,
The easiest way is to put the log4j.properties file in a folder that is
visible in the class path.
Another option would be to use the system property log4j.configuration
to specify the exact location of the file.
For instance:
javaw -Dlog4j.configuration="file://c:/myapp/myfile.properties" -jar
myapp.jar
This will try to load the myfile.properties file located in c:\myapp
folder for the Log4j initialization.
Regards