Re: Conditional appender enablement

2018-09-15 Thread Gary Gregory
On Sat, Sep 15, 2018 at 5:16 PM Gary Gregory wrote: > > > On Sat, Sep 15, 2018 at 4:43 PM Gary Gregory > wrote: > >> On Sat, Sep 15, 2018 at 4:40 PM Ralph Goers >> wrote: >> >>> If you don’t want to log anything then enable a noop appender that just >>> returns without doing anything >>> >> >>

Re: Conditional appender enablement

2018-09-15 Thread Gary Gregory
On Sat, Sep 15, 2018 at 4:43 PM Gary Gregory wrote: > On Sat, Sep 15, 2018 at 4:40 PM Ralph Goers > wrote: > >> If you don’t want to log anything then enable a noop appender that just >> returns without doing anything >> > > Oh, I see we already have a NullAppender... > So I can do:

Re: Conditional appender enablement

2018-09-15 Thread Gary Gregory
On Sat, Sep 15, 2018 at 4:40 PM Ralph Goers wrote: > If you don’t want to log anything then enable a noop appender that just > returns without doing anything > Oh, I see we already have a NullAppender... Gary > > Sent from my iPhone > > > On Sep 15, 2018, at 12:34 PM, Gary Gregory > wrote: >

Re: Conditional appender enablement

2018-09-15 Thread Ralph Goers
Or make sure it’s logging level causes it to never log Sent from my iPhone > On Sep 15, 2018, at 12:34 PM, Gary Gregory wrote: > > On Sat, Sep 15, 2018 at 3:24 PM Ralph Goers > wrote: > >> We have an appended selector for this. Why not us it? >> > > Hi, > > Because: > - Conceptually, I am

Re: Conditional appender enablement

2018-09-15 Thread Ralph Goers
If you don’t want to log anything then enable a noop appender that just returns without doing anything Sent from my iPhone > On Sep 15, 2018, at 12:34 PM, Gary Gregory wrote: > > On Sat, Sep 15, 2018 at 3:24 PM Ralph Goers > wrote: > >> We have an appended selector for this. Why not us it? >

Re: Conditional appender enablement

2018-09-15 Thread Gary Gregory
On Sat, Sep 15, 2018 at 3:24 PM Ralph Goers wrote: > We have an appended selector for this. Why not us it? > Hi, Because: - Conceptually, I am not selecting an appender out of a set, I want the one appender enabled or disabled. - In practice, using a ScriptAppenderSelector with a single Appende

Re: Conditional appender enablement

2018-09-15 Thread Ralph Goers
We have an appended selector for this. Why not us it? Sent from my iPhone > On Sep 15, 2018, at 11:07 AM, Gary Gregory wrote: > > Hi All: > > At work, we have an installer program that installs one of five log4j > configs depending on what the user selects in a UI. Each of these 5 configs > ca

Conditional appender enablement

2018-09-15 Thread Gary Gregory
Hi All: At work, we have an installer program that installs one of five log4j configs depending on what the user selects in a UI. Each of these 5 configs causes log events to end up in different kinds of SQL and NoSQL databases, you pick one when you install. The installer does a brute force searc