Re: Providing library defaults

Gary Gregory <[email protected]>
Newsgroups gmane.comp.jakarta.log4j.user
Message-ID <CACZkXPxcsezJn2s=wPTSicmytddsUEHKLNHNhTR9KLEejZ4wLg@mail.gmail.com>
You can use different logger names, different logger levels, and markers.
With these three levers, you can provide an incredible amount of
flexibility.

Gary

On Fri, Oct 29, 2021, 18:47 Ralph Goers <[email protected]> wrote:

> I’m not sure I completely understand the question
> * I’m not sure what you mean by “additive default configuration”.
> Certainly you can have a default configuration. Use you can add to it.
> * Don’t log by default would mean that both onMatch and onMismatch are set
> to DENY
>
> Ralph
>
> > On Oct 29, 2021, at 3:20 PM, Marius Volkhart <[email protected]>
> wrote:
> >
> > Hello all,
> >
> > I’m authoring a library that uses the Log4j API for internal logging. I
> want to provide my users valuable logging, but only under some
> circumstances. For example, if an expensive initializer gets called
> frequently, log a message indicating a possible performance impact. Or if
> logging something that may contain sensitive data, only logging it if they
> opt-in.
> >
> > I would typically solve this at the application layer using Filters. A
> ThresholdFilter and a MarkerFilter for example. Is there a way to provide
> an additive default configuration for my users? Or some other mechanism for
> saying “don’t log by default”? Or perhaps differently, am I wrong for
> thinking about the problem/solution this way?
> >
> > Thanks in advance!
> >
> >
> > Cheers,
> > Marius
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [email protected]
> > For additional commands, e-mail: [email protected]
> >
> >
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.