Hi,
I am trying to get a handle on Log4J and I have three problems/questions I am trying
to get
around.
First I am trying to use log4j with a web app that is distributed in a standard war
file. I want
to be able to distribute this file, along with the logging class and not worry about
configuring
log4j.
In my code I have PropertyConfigurator.configure("path to myLog.properties");
As a result I have to set this path every time I distribute the war file.
Is it possible to set this up so that the class file looks to where it has been
installed and
looks for myLog.properties there. This way I don't have to worry about setting to
myLog.properties.
Second, I have a rolling file set in myLog.properties via:
log4j.appender.R.File="/myRollingLog.log"
How can I do the same as in step one, have this file default to where the war file was
installed?
Third, I have the following code in each of my class files:
Category cat=Category.getinstance(myclass.class.getName());
How can I have the above through reflection find its own class name and therefore I
would have a
default statement? Something like
Category cat=Category.getInstance("Find_What_Class_This_Is).class.getName())?
Thanks for any help.
Alex
=====
Regards
Alex Colic, HBA, B. Ed
PopWare Inc. "Driving down the cost of conversions"
E-Mail: [EMAIL PROTECTED]
Tel: 1-905-777-8171 ext. 104
Fax: 1-905-777-0132
__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - Buy the things you want at great prices! http://auctions.yahoo.com/
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]