Create separate Loggers for the debug requests, and leave only those loggers at debug level. Then prepend log.debug() calls with if(log.isDebugEnabled()), so that the debug messages will only be created if the particular logger is debug enabled.
(I'm not sure I understood your question correctly, though) On 7/19/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
Hi all, I'm building some kind of server and I use log4j for logging. For troubleshooting issue I whant to be able to debug some few requests only (based on matching criterias) so that it is possible to debug live servers without killing performances. I managed to use NDC and filters to do that and it does well. However, filters are actually applied *after* log messages. Then using NDC+filters solves only half the issue since the debug messages are still created (even if not logged to disk). And because this is quite CPU and RAM intensive it would drop the performances below acceptable production-level. Do you know if there is any way to use a filter-like mechanis at log.isDebugEnabled() level for example? This way it would be possible to not even build debug messages when the NDC does not match criterias, thus saving a lot CPU and RAM usage and allowing debugging live servers. Thanks all, Vincent Bourdaraud.
-- Javier González Nicolini --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]