logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Remko Popma <remko.po...@gmail.com>
Subject Re: new feature proposal - microloggers
Date Thu, 23 Nov 2017 12:37:19 GMT
You know, I think we may already have something very similar...
Take a look at the second example under Map Filter:
https://logging.apache.org/log4j/2.x/manual/filters.html#MapFilter

If you use a RegexFilter (
https://logging.apache.org/log4j/2.x/manual/filters.html#RegexFilter) would
that meet your requirements?

Remko


On Thu, Nov 23, 2017 at 9:14 PM, Enric Jaen <enricjaen@yahoo.es.invalid>
wrote:

> Hi, Sometimes it happens that we want to see logs from a class, but not
> all logs as it can be verbose. I think it would useful to be able to filter
> logs inside a logger, specially when the logger is class.
>
> For example we could use include and exclude regexps:
>
>
>         <logger name=" org.springframework.beans.factory.support.DefaultListableBeanFactory"
> level="DEBUG">            <include string= "Creating shared instance of
> singleton bean"            <AppenderRef ref="PROJECT" />
>         </logger>
>
> or
>         <logger name=" org.springframework.beans.factory.support.DefaultListableBeanFactory"
> level="DEBUG">            <exclude string= "Returning cached instance"
>             <AppenderRef ref="PROJECT" />
>         </logger>
>
> What do you think?Regards
> Enric
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message