thanks for the reply. i'm looking into the ThreadContextMapFilter, and it
seems very interesting. I don't quite see how i apply a logging level to
the particular filter match?
<ThreadContextMapFilter onMatch="ACCEPT" onMismatch="REJECT">
<KeyValuePair key="debugUser" value="DEBUG"/>
</ThreadContextMapFilter>
from what i read, this looks into the thread context map, and if the
current thread had issued the command:
ThreadContext.put("debugUser","DEBUG"), then the log messages would pass
the filter. That's fantastic, however, I need to specify a level as well.
It looks like I want/need a combination of the ThreadContextMapFilter and
the ThresholdFilter. A ThreadContextMapThresholdFilter perhaps?
On Fri, Feb 13, 2015 at 11:39 AM, Ralph Goers <[email protected]>
wrote:
> See http://logging.apache.org/log4j/2.x/manual/eventlogging.html <
> http://logging.apache.org/log4j/2.x/manual/eventlogging.html>. You would
> then use
> http://logging.apache.org/log4j/2.x/manual/filters.html#ThreadContextMapFilter
> <
> http://logging.apache.org/log4j/2.x/manual/filters.html#ThreadContextMapFilter>
> to set the desired log level for the user.
>
> Ralph
>
> > On Feb 13, 2015, at 8:33 AM, Mark Lybarger <[email protected]> wrote:
> >
> > I have a j2ee application that i'd like to change the logging level on a
> > per thread or a per context basis. For intstance, I'd like to enable
> debug
> > level for user FOO. Has anyone encountered this ?
> >
> > Thanks,
> > -mark-
>
>