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 Chandra <ch...@rwth-aachen.de> on 2018/02/09 05:17:32 UTC

Programmatic disabling/enabling loggers

Guys, I have a requirement for the loggers to be disabled and enabled during my runtime. I’m assuming this can be done by Filters somehow, will need to check the doc.

Anyone has a better alternatives?


Thanks,

Best,
Chandra

Force flush buffered events

Posted by Chandra <ch...@rwth-aachen.de>.
In the context of changing the logging level to OFF during the runtime, what happens to the events that are already buffered ?

I have a situation where I’d turn off the logging at runtime and enable back again. All my log events are buffered (size based), I’d like to force flush them before I turn off the logging. — how can I achieve this?


Best,
Chandra


On 19 Feb 2018, 2:07 PM +0530, Tungathurthi, Chandra Kiran Bharadwaj <ch...@rwth-aachen.de>, wrote:
> Oh well, OFF might just work but, I'd have to remember the logging level for enabling it again :-/
>
>
>
> On Fri, Feb 9, 2018 at 9:07 PM +0530, "Mike Kienenberger" <mk...@gmail.com>> wrote:
>
>
> Do you need to disable them or just change the logging level to OFF?
>
> On Fri, Feb 9, 2018 at 12:17 AM, Chandra
> wrote:
> > Guys, I have a requirement for the loggers to be disabled and enabled during my runtime. I’m assuming this can be done by Filters somehow, will need to check the doc.
> >
> > Anyone has a better alternatives?
> >
> >
> > Thanks,
> >
> > Best,
> > Chandra
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>
>

Re: Programmatic disabling/enabling loggers

Posted by "Tungathurthi, Chandra Kiran Bharadwaj" <ch...@rwth-aachen.de>.
Oh well, OFF might just work  but, I'd have to remember the logging level for enabling it again :-/



On Fri, Feb 9, 2018 at 9:07 PM +0530, "Mike Kienenberger" <mk...@gmail.com>> wrote:


Do you need to disable them or just change the logging level to OFF?

On Fri, Feb 9, 2018 at 12:17 AM, Chandra
 wrote:
> Guys, I have a requirement for the loggers to be disabled and enabled during my runtime. I’m assuming this can be done by Filters somehow, will need to check the doc.
>
> Anyone has a better alternatives?
>
>
> Thanks,
>
> Best,
> Chandra

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



Re: Programmatic disabling/enabling loggers

Posted by Mike Kienenberger <mk...@gmail.com>.
Do you need to disable them or just change the logging level to OFF?

On Fri, Feb 9, 2018 at 12:17 AM, Chandra
<ch...@rwth-aachen.de> wrote:
> Guys, I have a requirement for the loggers to be disabled and enabled during my runtime. I’m assuming this can be done by Filters somehow, will need to check the doc.
>
> Anyone has a better alternatives?
>
>
> Thanks,
>
> Best,
> Chandra

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