[logback-user] Setting MDCFilter values at runtime

Dan Cripe dan.cripe at atginfo.com
Thu Apr 12 15:01:58 CEST 2012


Thanks Ralph, but after reading the user guide and java docs I'm not seeing how I can adjust this value at run time (only that I can set multiple values).  Basically, if there's a problem reported, I want to be able to use JMX or some other means to tell log back to start logging all messages for user X (an MDC value) at DEBUG and then later revert back to normal logging. 

Is it possible to get a reference to an existing turbo-filter and then set the value directly?  If so, I can create my own MBean that modifies the filter as needed.


On Apr 11, 2012, at 6:52 PM, Ralph Goers wrote:

> Use the DynamicThresholdFilter.
> 
> Ralph
> 
> On Apr 11, 2012, at 9:20 AM, Dan Cripe wrote:
> 
>> Hi- I'd like to leverage the MDCFilter TurboFilter, but I need to be able to change the "value" element at runtime.  Basically, if a specific user is having trouble, I want to set their logs to show up as DEBUG while the remainder of the logs show up as INFO.  Is there a way (preferably using JMX) that this can be done via configuration?  If not, what's the best approach programatically?
>> 
>> Thanks,
>> Dan
>> _______________________________________________
>> Logback-user mailing list
>> Logback-user at qos.ch
>> http://mailman.qos.ch/mailman/listinfo/logback-user
> 
> _______________________________________________
> Logback-user mailing list
> Logback-user at qos.ch
> http://mailman.qos.ch/mailman/listinfo/logback-user

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.qos.ch/pipermail/logback-user/attachments/20120412/832c4f3c/attachment.html>


More information about the Logback-user mailing list