Yours is a text-book requirement:

 http://logback.qos.ch/reasonsToSwitch.html#filters

See the docs on MDCFilter at [1].

[1]  http://logback.qos.ch/manual/filters.html#TurboFilter

--
Ceki
http://twitter.com/#!/ceki

On 11.06.2012 11:55, [email protected] wrote:
Dear all,

We're about to implement a logging strategy that for different users
different effective logger level are used. In particular, we are doing
EJB, and we have already pushed user info onto MDC to implement this
strategy.

By default, the system will run using the following example logger levels
for all users:
root = INFO
com.my.ejb1=WARNING
com.my.ejb2=INFO // different ejbs may have different default levels
...

When a system setting is enabled at runtime, we want to change
com.my.ejb1=DEBUG, but only for a few selected users. That is, if user A
invokes ejb1, all ejb1 log messages with level>= DEBUG will be logged,
while if another user B invokes ejb1, it uses the default setting, and
only messages with level>= WARNING will be logged. (it also honors the
logger hierarchy, that is if we want to change the level for a package,
all ejbs in that package behave in the same way)

We will do this on our production systems, so performance is critical.

What would be a good way to achieve this?

Kind Regards,

Yong



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to