Hi All,
I need to implements a user-level filter. I read in the archive some threads 
about that but I didn't found or i didn't understand the right way.
I have a web application and I want to keep the log level to info or error and just set to dubug for a single user. I know with MDC i'm able to track the username and i know there is a MDCFilter in order to filter the log that matches the filter.
What I can do is to set to ALL the global level and then in the filter, to log 
only the record of the user/s I want.
I think there is a big drawback in this approach. Basically my log calls are 
done checking first of all if the level is enable (code guard):

if (log.isDebugEnable()) { log.debug(....);
}

in order to avoid the parameter evaluation if debug is disabled. Using MDCFilter all calls will be evaluated with a potentially big impact on the performance because the filters are evaluated when the log message is sent to the appenders.

Any help will is appreciated.
Thanks in advance.

Ste



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to