Re: Forcing XML configuration file to reset Log4J configuration

2007-11-13 Thread Curt Arnold
On Nov 13, 2007, at 3:58 PM, Paul Duffy wrote: Folks, Been bit by the incremental nature of XML configuration application. Is there any way to not apply a changed XML configuration incrementally, but instead force full reset to reflect the state of the configuration file? Cheers lo

Re: Forcing XML configuration file to reset Log4J configuration

2007-11-13 Thread Paul Duffy
Thanks Matthew. We're talking about a JBoss environment using the configureAndWatch type of mechanism to pick up the XML configuration changes. There is no way to fully reset and reload the configuration w/o restarting the logging service? Matthew Kemp wrote: To reset an entire configurat

Re: Forcing XML configuration file to reset Log4J configuration

2007-11-13 Thread Matthew Kemp
To reset an entire configuration you need something like this: public void reloadLog4J() { LogManager.resetConfiguration(); DOMConfigurator.configure("log4j.xml"); } Unfortunately, even the DOMConfigurator.configureAndWatch() only does an incremental reload. Matt On Nov 13, 2007 3:58

Forcing XML configuration file to reset Log4J configuration

2007-11-13 Thread Paul Duffy
Folks, Been bit by the incremental nature of XML configuration application. Is there any way to not apply a changed XML configuration incrementally, but instead force full reset to reflect the state of the configuration file? Cheers --

RE: file location - windows vista

2007-11-13 Thread epic winter
Thanks you guys I got it. > From: [EMAIL PROTECTED] > Subject: Re: file location - windows vista > Date: Tue, 13 Nov 2007 11:47:11 -0600 > To: log4j-user@logging.apache.org > > > On Nov 13, 2007, at 9:55 AM, James A. N. Stauffer wrote: > > > With an XML config you can access system properties

Re: file location - windows vista

2007-11-13 Thread James A. N. Stauffer
That was a typo on my part. It should have been ${user.home }/logfilename.log On Nov 13, 2007 11:47 AM, Curt Arnold <[EMAIL PROTECTED]> wrote: > > On Nov 13, 2007, at 9:55 AM, James A. N. Stauffer wrote: > > > With an XML config you can access system properties like ${user.home$ > > }/logfilenam

Re: file location - windows vista

2007-11-13 Thread Curt Arnold
On Nov 13, 2007, at 9:55 AM, James A. N. Stauffer wrote: With an XML config you can access system properties like ${user.home$ }/logfilename.log I don't think the trailing $ is necessary and would expect that would actually break things, but I'm not sure. System property substitution a

Re: Log4j for Multiple classes

2007-11-13 Thread Curt Arnold
On Nov 13, 2007, at 8:47 AM, Tursun Wali wrote: Dear all, I want to write a logger for my project . log file for single class is Ok . log for multiple classes seems problem to me . I do not want to allocate one logger for one class , 10 logger for 10 class. I want to some other smart way .

Re: Trouble Referencing An XML Config File

2007-11-13 Thread tom . x . purl
Thanks for the quick response Matthew! "Matthew Kemp" <[EMAIL PROTECTED]> wrote on 11/08/2007 04:35:21 PM: > PropertyConfigurator only reads property files. To read an xml config > you need to use the DOMConfigurator. Another option would allow log4j > to statically initialize itself (your config

Re: file location - windows vista

2007-11-13 Thread James A. N. Stauffer
With an XML config you can access system properties like ${user.home$ }/logfilename.log On Nov 12, 2007 2:42 PM, epic winter <[EMAIL PROTECTED]> wrote: > > I have an application using log4j and in the past I have just specified: > log4j.appender.file.File=logfilename.log > > This would create the

Re: Log4j for Multiple classes

2007-11-13 Thread Matthew Kemp
Loggers can be named anything you want them to be. Traditionally they're named after the class to aid with debugging, etc. You don't have to specifically create a logger for each class. If at the top of every class you had a line like - private static final Logger logger = Logger.getLogger("foo");

Re: Log4j for Multiple classes

2007-11-13 Thread Tursun Wali
Dear all, I want to write a logger for my project . log file for single class is Ok . log for multiple classes seems problem to me . I do not want to allocate one logger for one class , 10 logger for 10 class. I want to some other smart way . There was a post in mailing list by John ([EMAIL PR