You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by Robin Coe <rc...@gmail.com> on 2016/03/15 21:08:42 UTC
Should the Appender have a level filter?
The current situation for filtering on log level is controlled by the
LoggerConfig but I'm wondering if that's enough? I'm wondering if it
wouldn't be preferable to associate the log level filter at the appender,
instead/additionally? I realize this is a major change but since a logger
is a one-to-many relationship to appenders, does it make more sense to
control whether to append an event at the most granular location, where the
event actually leaves the system?
I realize the log level cannot be removed from the logger (the
documentation change alone...) but would it make sense to allow an override
at the appender?
Thanks,
Robin.
Re: Should the Appender have a level filter?
Posted by Matt Sicker <bo...@gmail.com>.
Oh man I read that so wrong I looked like a bot responding to questions!
On 15 March 2016 at 17:47, Ralph Goers <ra...@dslextreme.com> wrote:
> I think he means that isEnabled would check the all filters. This would
> have a major negative impact on performance so fo that reason I would be
> against such a change.
>
> Ralph
>
> On Mar 15, 2016, at 1:13 PM, Matt Sicker <bo...@gmail.com> wrote:
>
> You can apply filters to appenders and loggers. There are actually four
> different places you can apply a filter to described here:
> http://logging.apache.org/log4j/2.x/manual/filters.html
>
> On 15 March 2016 at 15:08, Robin Coe <rc...@gmail.com> wrote:
>
>> The current situation for filtering on log level is controlled by the
>> LoggerConfig but I'm wondering if that's enough? I'm wondering if it
>> wouldn't be preferable to associate the log level filter at the appender,
>> instead/additionally? I realize this is a major change but since a logger
>> is a one-to-many relationship to appenders, does it make more sense to
>> control whether to append an event at the most granular location, where the
>> event actually leaves the system?
>>
>> I realize the log level cannot be removed from the logger (the
>> documentation change alone...) but would it make sense to allow an override
>> at the appender?
>>
>> Thanks,
>> Robin.
>>
>>
>
>
> --
> Matt Sicker <bo...@gmail.com>
>
>
--
Matt Sicker <bo...@gmail.com>
Re: Should the Appender have a level filter?
Posted by Ralph Goers <ra...@dslextreme.com>.
I think he means that isEnabled would check the all filters. This would have a major negative impact on performance so fo that reason I would be against such a change.
Ralph
> On Mar 15, 2016, at 1:13 PM, Matt Sicker <bo...@gmail.com> wrote:
>
> You can apply filters to appenders and loggers. There are actually four different places you can apply a filter to described here: http://logging.apache.org/log4j/2.x/manual/filters.html
>
>> On 15 March 2016 at 15:08, Robin Coe <rc...@gmail.com> wrote:
>> The current situation for filtering on log level is controlled by the LoggerConfig but I'm wondering if that's enough? I'm wondering if it wouldn't be preferable to associate the log level filter at the appender, instead/additionally? I realize this is a major change but since a logger is a one-to-many relationship to appenders, does it make more sense to control whether to append an event at the most granular location, where the event actually leaves the system?
>>
>> I realize the log level cannot be removed from the logger (the documentation change alone...) but would it make sense to allow an override at the appender?
>>
>> Thanks,
>> Robin.
>
>
>
> --
> Matt Sicker <bo...@gmail.com>
Re: Should the Appender have a level filter?
Posted by Matt Sicker <bo...@gmail.com>.
You can apply filters to appenders and loggers. There are actually four
different places you can apply a filter to described here:
http://logging.apache.org/log4j/2.x/manual/filters.html
On 15 March 2016 at 15:08, Robin Coe <rc...@gmail.com> wrote:
> The current situation for filtering on log level is controlled by the
> LoggerConfig but I'm wondering if that's enough? I'm wondering if it
> wouldn't be preferable to associate the log level filter at the appender,
> instead/additionally? I realize this is a major change but since a logger
> is a one-to-many relationship to appenders, does it make more sense to
> control whether to append an event at the most granular location, where the
> event actually leaves the system?
>
> I realize the log level cannot be removed from the logger (the
> documentation change alone...) but would it make sense to allow an override
> at the appender?
>
> Thanks,
> Robin.
>
>
--
Matt Sicker <bo...@gmail.com>