logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ralph Goers <ralph.go...@dslextreme.com>
Subject Re: thread debug level
Date Thu, 14 Mar 2013 13:59:58 GMT
This is possible now.  Please see http://logging.apache.org/log4j/2.x/manual/filters.html#ThreadContextMapFilter.
If you add the user's loginid to the ThreadContextMap you can filter users at different logging


On Mar 14, 2013, at 3:03 AM, Tushar Kapila wrote:

> it would be nice to have thread debug level. why? we have 80% code that is shared in
one data center by 25 customers.
> now when we make changes that affect at most 2-3 customers or add a new one, its nice
to have more debug for that customer. most of our classes are multi customer and the only
way to add debug at customer level is to have if statements (
> if customer.getDebugForFeature("some id in our db params table") > 2){
>    logger.debug ...
> instead is there a way to tell new log4j2 that WARNING is the general debug level, but
at some point in a thread make that thread have level DEBUG and then later we need to turn
it back ourselves?
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org

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