Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / December 2005

Tip: Looking for answers? Try searching our database.

org.apache.commons.logging, where to place log4j.properties file in stand alone applications

Thread view: 
Chanchal - 05 Dec 2005 10:31 GMT
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


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.