Categories
Development

Log4J and Nested Diagnostic Context

Rory Winston talks about Nested Diagnostic Context. It’s a nice feature of Log4J that lets you obtain the the method name and context without explicitly adding lines to yours log for entry and exit of methods.

update: An anonymous writer in the comments tipped med about Mapped Diagnostic Context too. I found a great article here that covers both NDC and MDC as well as some other aspects of Log4J.

One reply on “Log4J and Nested Diagnostic Context”

Leave a Reply

Your email address will not be published. Required fields are marked *