Re: Providing library defaults
Ralph Goers <[email protected]>
| Newsgroups | gmane.comp.jakarta.log4j.user |
|---|---|
| Message-ID | <[email protected]> |
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] > >