[slf4j-user] Why is there no NDC?
Joern Huxhorn
jhuxhorn at googlemail.com
Thu Jan 22 02:13:02 CET 2009
Hi.
I hope I'm not beating a dead horse but I just somewhat rediscovered
the log4j NDC class (I was using commons.logging before switching to
slf4j) and I was wondering why there is no NDC class defined in slf4j.
While the original NDC class could be improved it seems like a quite
nice addition to the MDC. I guess it would get especially interesting
with closures where you could write something like
(pseudo-code)
slf4j.NDC("Parameter is {}.", obj)
{
[the nested code]
}
which would remove the necessity to pop the stack manually.
But even without closures an NDC implementation utilizing parameters
seems really worthwhile to me.
Just wondering,
Joern.
More information about the slf4j-user
mailing list