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.

Reply via email to