You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by Tushar Kapila <tg...@gmail.com> on 2013/03/14 11:03:46 UTC
Re: thread debug level
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
Re: thread debug level
Posted by Gary Gregory <ga...@gmail.com>.
(I fixed some missing pretty print for one of the XML documents, in SVN)
Gary
On Thu, Mar 14, 2013 at 9:59 AM, Ralph Goers <ra...@dslextreme.com>wrote:
> 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 levels.
>
> Ralph
>
> 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
> >
>
>
--
E-Mail: garydgregory@gmail.com | ggregory@apache.org
JUnit in Action, 2nd Ed: <http://goog_1249600977>http://bit.ly/ECvg0
Spring Batch in Action: <http://s.apache.org/HOq>http://bit.ly/bqpbCK
Blog: http://garygregory.wordpress.com
Home: http://garygregory.com/
Tweet! http://twitter.com/GaryGregory
Re: thread debug level
Posted by Ralph Goers <ra...@dslextreme.com>.
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 levels.
Ralph
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
>