You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by Chien Wei Tan <Ch...@calytrix.com> on 2001/08/10 08:31:58 UTC

runtime modification to log


hi,

would anyone know if it is possible to say, have your system running, and
changing your log priority from the configuration file, without stopping the
system.

eg. - system is running, and configuration file specifies logging at
priority INFO
    - now, while system is running, can we change the configuration file to
specify logging at priority DEBUG
      so that the log now prints messages from priority DEBUG upwards ???


any hint would be greatly appreciated.

cheers,
chienwei


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-user-help@jakarta.apache.org


Re: runtime modification to log

Posted by Christopher Taylor <cs...@java-internals.com>.
Other than cloning? ;)

I've updated the FAQ with four questions and answers:

- Why can't Log4J find my configuration file in a J2EE application?
- Can Log4J automatically reload my configuration files?
- (my stuff) Why do I get ugly messages from the NT Event Viewer when using
the NTEventLogAppender?
- Why can't the NT EventLogAppender dynamically change category messages?

If I see any other commonly-asked questions, I'll update the FAQ.

How about putting this in the header and footer of the mailing list
messages?
----------------------------------------------------------------------------
------------------------------
- Questions? We have answers!  Check the Log4J FAQ:
http://jakarta.apache.org/log4j/docs/FAQ.html -
----------------------------------------------------------------------------
------------------------------

Hopefully that might cut down on some of the emails.

-Chris

----- Original Message -----
From: "Ceki Gülcü" <cg...@qos.ch>
To: "LOG4J Users Mailing List" <lo...@jakarta.apache.org>
Sent: Saturday, August 11, 2001 9:48 PM
Subject: Re: runtime modification to log



Hi Chris,

Tell me about it. Do you have a suggestion in mind?  Ceki

At 13:18 11.08.2001 +0900, Christopher Taylor wrote:
>Hey Ceki,
>
>Are you getting burned out on these questions?  They seem to come in waves
>(I've seen the "J2EE classloader problems" and "automatically reconfiguring
>Log4J" come up at least twice a month)...
>
>-Chris
>
>----- Original Message -----
>From: "Ceki Gülcü" <cg...@qos.ch>
>To: "LOG4J Users Mailing List" <lo...@jakarta.apache.org>
>Sent: Friday, August 10, 2001 9:29 PM
>Subject: Re: runtime modification to log
>
>
>
>Sigh. I repeat:
>
>Please see ProppertyConfigurator.configureAndWatch at
>
>http://jakarta.apache.org/log4j/docs/api/org/apache/log4j/PropertyConfigura
t
>or.html#configureAndWatch(java.lang.String)
>
>and  DOMConfigurator.configureAndWatch methods at
>
>http://jakarta.apache.org/log4j/docs/api/org/apache/log4j/xml/DOMConfigurat
o
>r.html#configureAndWatch(java.lang.String,%20long)
>
>Hope this makes it clearer. Ceki
>
>At 04:57 10.08.2001 -0700, you wrote:
>>Oh yeah I knew you could process configuration files as many times as
>>you want, but his problem would be knowing when the file has changed to
>>trigger the processing. I'm assuming he wants this automated so that
>>when he changes the configuration file the re-processing occurs
>>"automatically". That's where he faces problems.
>>
>>-- Don
>>
>>--- Ceki Gülcü <cg...@qos.ch> wrote:
>>> Don,
>>>
>>> You can process configuration files as many times as you want. Please
>>> see ProppertyConfigurator.configureAndWatch and
>>> DOMConfigurator.configureAndWatch methods. Regards, Ceki
>>>
>>> At 04:34 10.08.2001 -0700, Don Taylor wrote:
>>> >AFAIK, no. You only process the configuration file once. You *could*
>>> >programmatically change the priority of a category while the system
>>> is
>>> >running.
>>> >
>>> >--- Chien Wei Tan <Ch...@calytrix.com> wrote:
>>> >>
>>> >>
>>> >> hi,
>>> >>
>>> >> would anyone know if it is possible to say, have your system
>>> running,
>>> >> and
>>> >> changing your log priority from the configuration file, without
>>> >> stopping the
>>> >> system.
>>> >>
>>> >> eg. - system is running, and configuration file specifies logging
>>> at
>>> >> priority INFO
>>> >>     - now, while system is running, can we change the
>>> configuration
>>> >> file to
>>> >> specify logging at priority DEBUG
>>> >>       so that the log now prints messages from priority DEBUG
>>> upwards
>>> >> ???
>>> >>
>>> >>
>>> >> any hint would be greatly appreciated.
>>> >>
>>> >> cheers,
>>> >> chienwei
>>> >>
>>> >>
>>> >>
>>> ---------------------------------------------------------------------
>>> >> To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
>>> >> For additional commands, e-mail:
>>> log4j-user-help@jakarta.apache.org
>>> >>
>>> >
>>> >
>>> >=====
>>> >Don
>>> >
>>> >__________________________________________________
>>> >Do You Yahoo!?
>>> >Make international calls for as low as $.04/minute with Yahoo!
>>> Messenger
>>> >http://phonecard.yahoo.com/
>>> >
>>>
>>>---------------------------------------------------------------------
>>> >To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
>>> >For additional commands, e-mail: log4j-user-help@jakarta.apache.org
>>>
>>> --
>>> Ceki Gülcü - http://qos.ch
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
>>> For additional commands, e-mail: log4j-user-help@jakarta.apache.org
>>>
>>
>>
>>__________________________________________________
>>Do You Yahoo!?
>>Make international calls for as low as $.04/minute with Yahoo! Messenger
>>http://phonecard.yahoo.com/
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail: log4j-user-help@jakarta.apache.org
>
>--
>Ceki Gülcü - http://qos.ch
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: log4j-user-help@jakarta.apache.org
>
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: log4j-user-help@jakarta.apache.org

--
Ceki Gülcü - http://qos.ch


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-user-help@jakarta.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-user-help@jakarta.apache.org


Re: runtime modification to log

Posted by Ceki Gülcü <cg...@qos.ch>.
Hi Chris,

Tell me about it. Do you have a suggestion in mind?  Ceki

At 13:18 11.08.2001 +0900, Christopher Taylor wrote:
>Hey Ceki,
>
>Are you getting burned out on these questions?  They seem to come in waves
>(I've seen the "J2EE classloader problems" and "automatically reconfiguring
>Log4J" come up at least twice a month)...
>
>-Chris
>
>----- Original Message -----
>From: "Ceki Gülcü" <cg...@qos.ch>
>To: "LOG4J Users Mailing List" <lo...@jakarta.apache.org>
>Sent: Friday, August 10, 2001 9:29 PM
>Subject: Re: runtime modification to log
>
>
>
>Sigh. I repeat:
>
>Please see ProppertyConfigurator.configureAndWatch at
>
>http://jakarta.apache.org/log4j/docs/api/org/apache/log4j/PropertyConfigurat
>or.html#configureAndWatch(java.lang.String)
>
>and  DOMConfigurator.configureAndWatch methods at
>
>http://jakarta.apache.org/log4j/docs/api/org/apache/log4j/xml/DOMConfigurato
>r.html#configureAndWatch(java.lang.String,%20long)
>
>Hope this makes it clearer. Ceki
>
>At 04:57 10.08.2001 -0700, you wrote:
>>Oh yeah I knew you could process configuration files as many times as
>>you want, but his problem would be knowing when the file has changed to
>>trigger the processing. I'm assuming he wants this automated so that
>>when he changes the configuration file the re-processing occurs
>>"automatically". That's where he faces problems.
>>
>>-- Don
>>
>>--- Ceki Gülcü <cg...@qos.ch> wrote:
>>> Don,
>>>
>>> You can process configuration files as many times as you want. Please
>>> see ProppertyConfigurator.configureAndWatch and
>>> DOMConfigurator.configureAndWatch methods. Regards, Ceki
>>>
>>> At 04:34 10.08.2001 -0700, Don Taylor wrote:
>>> >AFAIK, no. You only process the configuration file once. You *could*
>>> >programmatically change the priority of a category while the system
>>> is
>>> >running.
>>> >
>>> >--- Chien Wei Tan <Ch...@calytrix.com> wrote:
>>> >>
>>> >>
>>> >> hi,
>>> >>
>>> >> would anyone know if it is possible to say, have your system
>>> running,
>>> >> and
>>> >> changing your log priority from the configuration file, without
>>> >> stopping the
>>> >> system.
>>> >>
>>> >> eg. - system is running, and configuration file specifies logging
>>> at
>>> >> priority INFO
>>> >>     - now, while system is running, can we change the
>>> configuration
>>> >> file to
>>> >> specify logging at priority DEBUG
>>> >>       so that the log now prints messages from priority DEBUG
>>> upwards
>>> >> ???
>>> >>
>>> >>
>>> >> any hint would be greatly appreciated.
>>> >>
>>> >> cheers,
>>> >> chienwei
>>> >>
>>> >>
>>> >>
>>> ---------------------------------------------------------------------
>>> >> To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
>>> >> For additional commands, e-mail:
>>> log4j-user-help@jakarta.apache.org
>>> >>
>>> >
>>> >
>>> >=====
>>> >Don
>>> >
>>> >__________________________________________________
>>> >Do You Yahoo!?
>>> >Make international calls for as low as $.04/minute with Yahoo!
>>> Messenger
>>> >http://phonecard.yahoo.com/
>>> >
>>>
>>>---------------------------------------------------------------------
>>> >To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
>>> >For additional commands, e-mail: log4j-user-help@jakarta.apache.org
>>>
>>> --
>>> Ceki Gülcü - http://qos.ch
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
>>> For additional commands, e-mail: log4j-user-help@jakarta.apache.org
>>>
>>
>>
>>__________________________________________________
>>Do You Yahoo!?
>>Make international calls for as low as $.04/minute with Yahoo! Messenger
>>http://phonecard.yahoo.com/
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail: log4j-user-help@jakarta.apache.org
>
>--
>Ceki Gülcü - http://qos.ch
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: log4j-user-help@jakarta.apache.org
>
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: log4j-user-help@jakarta.apache.org

--
Ceki Gülcü - http://qos.ch


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-user-help@jakarta.apache.org


Re: runtime modification to log

Posted by Christopher Taylor <cs...@java-internals.com>.
Hey Ceki,

Are you getting burned out on these questions?  They seem to come in waves
(I've seen the "J2EE classloader problems" and "automatically reconfiguring
Log4J" come up at least twice a month)...

-Chris

----- Original Message -----
From: "Ceki Gülcü" <cg...@qos.ch>
To: "LOG4J Users Mailing List" <lo...@jakarta.apache.org>
Sent: Friday, August 10, 2001 9:29 PM
Subject: Re: runtime modification to log



Sigh. I repeat:

Please see ProppertyConfigurator.configureAndWatch at

http://jakarta.apache.org/log4j/docs/api/org/apache/log4j/PropertyConfigurat
or.html#configureAndWatch(java.lang.String)

and  DOMConfigurator.configureAndWatch methods at

http://jakarta.apache.org/log4j/docs/api/org/apache/log4j/xml/DOMConfigurato
r.html#configureAndWatch(java.lang.String,%20long)

Hope this makes it clearer. Ceki

At 04:57 10.08.2001 -0700, you wrote:
>Oh yeah I knew you could process configuration files as many times as
>you want, but his problem would be knowing when the file has changed to
>trigger the processing. I'm assuming he wants this automated so that
>when he changes the configuration file the re-processing occurs
>"automatically". That's where he faces problems.
>
>-- Don
>
>--- Ceki Gülcü <cg...@qos.ch> wrote:
>> Don,
>>
>> You can process configuration files as many times as you want. Please
>> see ProppertyConfigurator.configureAndWatch and
>> DOMConfigurator.configureAndWatch methods. Regards, Ceki
>>
>> At 04:34 10.08.2001 -0700, Don Taylor wrote:
>> >AFAIK, no. You only process the configuration file once. You *could*
>> >programmatically change the priority of a category while the system
>> is
>> >running.
>> >
>> >--- Chien Wei Tan <Ch...@calytrix.com> wrote:
>> >>
>> >>
>> >> hi,
>> >>
>> >> would anyone know if it is possible to say, have your system
>> running,
>> >> and
>> >> changing your log priority from the configuration file, without
>> >> stopping the
>> >> system.
>> >>
>> >> eg. - system is running, and configuration file specifies logging
>> at
>> >> priority INFO
>> >>     - now, while system is running, can we change the
>> configuration
>> >> file to
>> >> specify logging at priority DEBUG
>> >>       so that the log now prints messages from priority DEBUG
>> upwards
>> >> ???
>> >>
>> >>
>> >> any hint would be greatly appreciated.
>> >>
>> >> cheers,
>> >> chienwei
>> >>
>> >>
>> >>
>> ---------------------------------------------------------------------
>> >> To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
>> >> For additional commands, e-mail:
>> log4j-user-help@jakarta.apache.org
>> >>
>> >
>> >
>> >=====
>> >Don
>> >
>> >__________________________________________________
>> >Do You Yahoo!?
>> >Make international calls for as low as $.04/minute with Yahoo!
>> Messenger
>> >http://phonecard.yahoo.com/
>> >
>>
>>---------------------------------------------------------------------
>> >To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
>> >For additional commands, e-mail: log4j-user-help@jakarta.apache.org
>>
>> --
>> Ceki Gülcü - http://qos.ch
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: log4j-user-help@jakarta.apache.org
>>
>
>
>__________________________________________________
>Do You Yahoo!?
>Make international calls for as low as $.04/minute with Yahoo! Messenger
>http://phonecard.yahoo.com/
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: log4j-user-help@jakarta.apache.org

--
Ceki Gülcü - http://qos.ch


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-user-help@jakarta.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-user-help@jakarta.apache.org


Re: runtime modification to log

Posted by Don Taylor <do...@yahoo.com>.
Doh! Didn't fully comprehend (probably didn't fully read) what you were
saying! Learn something new every day!

-- don

--- Ceki G�lc� <cg...@qos.ch> wrote:
> 
> Sigh. I repeat:
> 
> Please see ProppertyConfigurator.configureAndWatch at
> 
>
http://jakarta.apache.org/log4j/docs/api/org/apache/log4j/PropertyConfigurator.html#configureAndWatch(java.lang.String)
> 
> and  DOMConfigurator.configureAndWatch methods at
> 
>
http://jakarta.apache.org/log4j/docs/api/org/apache/log4j/xml/DOMConfigurator.html#configureAndWatch(java.lang.String,%20long)
> 
> Hope this makes it clearer. Ceki
> 
> At 04:57 10.08.2001 -0700, you wrote:
> >Oh yeah I knew you could process configuration files as many times
> as 
> >you want, but his problem would be knowing when the file has changed
> to
> >trigger the processing. I'm assuming he wants this automated so that
> >when he changes the configuration file the re-processing occurs
> >"automatically". That's where he faces problems.
> >
> >-- Don
> >
> >--- Ceki G�lc� <cg...@qos.ch> wrote:
> >> Don,
> >> 
> >> You can process configuration files as many times as you want.
> Please
> >> see ProppertyConfigurator.configureAndWatch and
> >> DOMConfigurator.configureAndWatch methods. Regards, Ceki
> >> 
> >> At 04:34 10.08.2001 -0700, Don Taylor wrote:
> >> >AFAIK, no. You only process the configuration file once. You
> *could*
> >> >programmatically change the priority of a category while the
> system
> >> is
> >> >running.
> >> >
> >> >--- Chien Wei Tan <Ch...@calytrix.com> wrote:
> >> >> 
> >> >> 
> >> >> hi,
> >> >> 
> >> >> would anyone know if it is possible to say, have your system
> >> running,
> >> >> and
> >> >> changing your log priority from the configuration file, without
> >> >> stopping the
> >> >> system.
> >> >> 
> >> >> eg. - system is running, and configuration file specifies
> logging
> >> at
> >> >> priority INFO
> >> >>     - now, while system is running, can we change the
> >> configuration
> >> >> file to
> >> >> specify logging at priority DEBUG
> >> >>       so that the log now prints messages from priority DEBUG
> >> upwards
> >> >> ???
> >> >> 
> >> >> 
> >> >> any hint would be greatly appreciated.
> >> >> 
> >> >> cheers,
> >> >> chienwei
> >> >> 
> >> >> 
> >> >>
> >>
> ---------------------------------------------------------------------
> >> >> To unsubscribe, e-mail:
> log4j-user-unsubscribe@jakarta.apache.org
> >> >> For additional commands, e-mail:
> >> log4j-user-help@jakarta.apache.org
> >> >> 
> >> >
> >> >
> >> >=====
> >> >Don
> >> >
> >> >__________________________________________________
> >> >Do You Yahoo!?
> >> >Make international calls for as low as $.04/minute with Yahoo!
> >> Messenger
> >> >http://phonecard.yahoo.com/
> >> >
> >>
>
>>---------------------------------------------------------------------
> >> >To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
> >> >For additional commands, e-mail:
> log4j-user-help@jakarta.apache.org
> >> 
> >> --
> >> Ceki G�lc� - http://qos.ch
> >> 
> >> 
> >>
> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
> >> For additional commands, e-mail:
> log4j-user-help@jakarta.apache.org
> >> 
> >
> >
> >__________________________________________________
> >Do You Yahoo!?
> >Make international calls for as low as $.04/minute with Yahoo!
> Messenger
> >http://phonecard.yahoo.com/
> >
>
>---------------------------------------------------------------------
> >To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
> >For additional commands, e-mail: log4j-user-help@jakarta.apache.org
> 
> --
> Ceki G�lc� - http://qos.ch
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: log4j-user-help@jakarta.apache.org
> 


__________________________________________________
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-user-help@jakarta.apache.org


RE: runtime modification to log

Posted by Chien Wei Tan <Ch...@calytrix.com>.

hi guys,

thanks, i have created a test scenario where my system starts up and is
running. Using PropertyConfigurator.configureAndWatch() method, i can modify
the config file, and see the corresponding change in log messages, and my
system is still running. ie. i dont have to stop and restart... cool !!!

Thanks ceki, and all the others for your kind inputs !

cheers,
chien wei

-----Original Message-----
From: Ceki Gülcü [mailto:cgu@qos.ch]
Sent: Friday, 10 August 2001 8:30 PM
To: LOG4J Users Mailing List
Subject: Re: runtime modification to log



Sigh. I repeat:

Please see ProppertyConfigurator.configureAndWatch at

http://jakarta.apache.org/log4j/docs/api/org/apache/log4j/PropertyConfigurat
or.html#configureAndWatch(java.lang.String)

and  DOMConfigurator.configureAndWatch methods at

http://jakarta.apache.org/log4j/docs/api/org/apache/log4j/xml/DOMConfigurato
r.html#configureAndWatch(java.lang.String,%20long)

Hope this makes it clearer. Ceki

At 04:57 10.08.2001 -0700, you wrote:
>Oh yeah I knew you could process configuration files as many times as
>you want, but his problem would be knowing when the file has changed to
>trigger the processing. I'm assuming he wants this automated so that
>when he changes the configuration file the re-processing occurs
>"automatically". That's where he faces problems.
>
>-- Don
>
>--- Ceki Gülcü <cg...@qos.ch> wrote:
>> Don,
>>
>> You can process configuration files as many times as you want. Please
>> see ProppertyConfigurator.configureAndWatch and
>> DOMConfigurator.configureAndWatch methods. Regards, Ceki
>>
>> At 04:34 10.08.2001 -0700, Don Taylor wrote:
>> >AFAIK, no. You only process the configuration file once. You *could*
>> >programmatically change the priority of a category while the system
>> is
>> >running.
>> >
>> >--- Chien Wei Tan <Ch...@calytrix.com> wrote:
>> >>
>> >>
>> >> hi,
>> >>
>> >> would anyone know if it is possible to say, have your system
>> running,
>> >> and
>> >> changing your log priority from the configuration file, without
>> >> stopping the
>> >> system.
>> >>
>> >> eg. - system is running, and configuration file specifies logging
>> at
>> >> priority INFO
>> >>     - now, while system is running, can we change the
>> configuration
>> >> file to
>> >> specify logging at priority DEBUG
>> >>       so that the log now prints messages from priority DEBUG
>> upwards
>> >> ???
>> >>
>> >>
>> >> any hint would be greatly appreciated.
>> >>
>> >> cheers,
>> >> chienwei
>> >>
>> >>
>> >>
>> ---------------------------------------------------------------------
>> >> To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
>> >> For additional commands, e-mail:
>> log4j-user-help@jakarta.apache.org
>> >>
>> >
>> >
>> >=====
>> >Don
>> >
>> >__________________________________________________
>> >Do You Yahoo!?
>> >Make international calls for as low as $.04/minute with Yahoo!
>> Messenger
>> >http://phonecard.yahoo.com/
>> >
>>
>>---------------------------------------------------------------------
>> >To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
>> >For additional commands, e-mail: log4j-user-help@jakarta.apache.org
>>
>> --
>> Ceki Gülcü - http://qos.ch
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: log4j-user-help@jakarta.apache.org
>>
>
>
>__________________________________________________
>Do You Yahoo!?
>Make international calls for as low as $.04/minute with Yahoo! Messenger
>http://phonecard.yahoo.com/
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: log4j-user-help@jakarta.apache.org

--
Ceki Gülcü - http://qos.ch


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-user-help@jakarta.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-user-help@jakarta.apache.org


Re: runtime modification to log

Posted by Ceki Gülcü <cg...@qos.ch>.
Sigh. I repeat:

Please see ProppertyConfigurator.configureAndWatch at

http://jakarta.apache.org/log4j/docs/api/org/apache/log4j/PropertyConfigurator.html#configureAndWatch(java.lang.String)

and  DOMConfigurator.configureAndWatch methods at

http://jakarta.apache.org/log4j/docs/api/org/apache/log4j/xml/DOMConfigurator.html#configureAndWatch(java.lang.String,%20long)

Hope this makes it clearer. Ceki

At 04:57 10.08.2001 -0700, you wrote:
>Oh yeah I knew you could process configuration files as many times as 
>you want, but his problem would be knowing when the file has changed to
>trigger the processing. I'm assuming he wants this automated so that
>when he changes the configuration file the re-processing occurs
>"automatically". That's where he faces problems.
>
>-- Don
>
>--- Ceki Gülcü <cg...@qos.ch> wrote:
>> Don,
>> 
>> You can process configuration files as many times as you want. Please
>> see ProppertyConfigurator.configureAndWatch and
>> DOMConfigurator.configureAndWatch methods. Regards, Ceki
>> 
>> At 04:34 10.08.2001 -0700, Don Taylor wrote:
>> >AFAIK, no. You only process the configuration file once. You *could*
>> >programmatically change the priority of a category while the system
>> is
>> >running.
>> >
>> >--- Chien Wei Tan <Ch...@calytrix.com> wrote:
>> >> 
>> >> 
>> >> hi,
>> >> 
>> >> would anyone know if it is possible to say, have your system
>> running,
>> >> and
>> >> changing your log priority from the configuration file, without
>> >> stopping the
>> >> system.
>> >> 
>> >> eg. - system is running, and configuration file specifies logging
>> at
>> >> priority INFO
>> >>     - now, while system is running, can we change the
>> configuration
>> >> file to
>> >> specify logging at priority DEBUG
>> >>       so that the log now prints messages from priority DEBUG
>> upwards
>> >> ???
>> >> 
>> >> 
>> >> any hint would be greatly appreciated.
>> >> 
>> >> cheers,
>> >> chienwei
>> >> 
>> >> 
>> >>
>> ---------------------------------------------------------------------
>> >> To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
>> >> For additional commands, e-mail:
>> log4j-user-help@jakarta.apache.org
>> >> 
>> >
>> >
>> >=====
>> >Don
>> >
>> >__________________________________________________
>> >Do You Yahoo!?
>> >Make international calls for as low as $.04/minute with Yahoo!
>> Messenger
>> >http://phonecard.yahoo.com/
>> >
>>
>>---------------------------------------------------------------------
>> >To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
>> >For additional commands, e-mail: log4j-user-help@jakarta.apache.org
>> 
>> --
>> Ceki Gülcü - http://qos.ch
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: log4j-user-help@jakarta.apache.org
>> 
>
>
>__________________________________________________
>Do You Yahoo!?
>Make international calls for as low as $.04/minute with Yahoo! Messenger
>http://phonecard.yahoo.com/
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: log4j-user-help@jakarta.apache.org

--
Ceki Gülcü - http://qos.ch


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-user-help@jakarta.apache.org


Re: runtime modification to log

Posted by Don Taylor <do...@yahoo.com>.
Oh yeah I knew you could process configuration files as many times as 
you want, but his problem would be knowing when the file has changed to
trigger the processing. I'm assuming he wants this automated so that
when he changes the configuration file the re-processing occurs
"automatically". That's where he faces problems.

-- Don

--- Ceki G�lc� <cg...@qos.ch> wrote:
> Don,
> 
> You can process configuration files as many times as you want. Please
> see ProppertyConfigurator.configureAndWatch and
> DOMConfigurator.configureAndWatch methods. Regards, Ceki
> 
> At 04:34 10.08.2001 -0700, Don Taylor wrote:
> >AFAIK, no. You only process the configuration file once. You *could*
> >programmatically change the priority of a category while the system
> is
> >running.
> >
> >--- Chien Wei Tan <Ch...@calytrix.com> wrote:
> >> 
> >> 
> >> hi,
> >> 
> >> would anyone know if it is possible to say, have your system
> running,
> >> and
> >> changing your log priority from the configuration file, without
> >> stopping the
> >> system.
> >> 
> >> eg. - system is running, and configuration file specifies logging
> at
> >> priority INFO
> >>     - now, while system is running, can we change the
> configuration
> >> file to
> >> specify logging at priority DEBUG
> >>       so that the log now prints messages from priority DEBUG
> upwards
> >> ???
> >> 
> >> 
> >> any hint would be greatly appreciated.
> >> 
> >> cheers,
> >> chienwei
> >> 
> >> 
> >>
> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
> >> For additional commands, e-mail:
> log4j-user-help@jakarta.apache.org
> >> 
> >
> >
> >=====
> >Don
> >
> >__________________________________________________
> >Do You Yahoo!?
> >Make international calls for as low as $.04/minute with Yahoo!
> Messenger
> >http://phonecard.yahoo.com/
> >
>
>---------------------------------------------------------------------
> >To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
> >For additional commands, e-mail: log4j-user-help@jakarta.apache.org
> 
> --
> Ceki G�lc� - http://qos.ch
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: log4j-user-help@jakarta.apache.org
> 


__________________________________________________
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-user-help@jakarta.apache.org


Re: runtime modification to log

Posted by Ceki Gülcü <cg...@qos.ch>.
Don,

You can process configuration files as many times as you want. Please see ProppertyConfigurator.configureAndWatch and DOMConfigurator.configureAndWatch methods. Regards, Ceki

At 04:34 10.08.2001 -0700, Don Taylor wrote:
>AFAIK, no. You only process the configuration file once. You *could*
>programmatically change the priority of a category while the system is
>running.
>
>--- Chien Wei Tan <Ch...@calytrix.com> wrote:
>> 
>> 
>> hi,
>> 
>> would anyone know if it is possible to say, have your system running,
>> and
>> changing your log priority from the configuration file, without
>> stopping the
>> system.
>> 
>> eg. - system is running, and configuration file specifies logging at
>> priority INFO
>>     - now, while system is running, can we change the configuration
>> file to
>> specify logging at priority DEBUG
>>       so that the log now prints messages from priority DEBUG upwards
>> ???
>> 
>> 
>> any hint would be greatly appreciated.
>> 
>> cheers,
>> chienwei
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: log4j-user-help@jakarta.apache.org
>> 
>
>
>=====
>Don
>
>__________________________________________________
>Do You Yahoo!?
>Make international calls for as low as $.04/minute with Yahoo! Messenger
>http://phonecard.yahoo.com/
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: log4j-user-help@jakarta.apache.org

--
Ceki Gülcü - http://qos.ch


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-user-help@jakarta.apache.org


Re: runtime modification to log

Posted by Don Taylor <do...@yahoo.com>.
AFAIK, no. You only process the configuration file once. You *could*
programmatically change the priority of a category while the system is
running.

--- Chien Wei Tan <Ch...@calytrix.com> wrote:
> 
> 
> hi,
> 
> would anyone know if it is possible to say, have your system running,
> and
> changing your log priority from the configuration file, without
> stopping the
> system.
> 
> eg. - system is running, and configuration file specifies logging at
> priority INFO
>     - now, while system is running, can we change the configuration
> file to
> specify logging at priority DEBUG
>       so that the log now prints messages from priority DEBUG upwards
> ???
> 
> 
> any hint would be greatly appreciated.
> 
> cheers,
> chienwei
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: log4j-user-help@jakarta.apache.org
> 


=====
Don

__________________________________________________
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-user-help@jakarta.apache.org