Just for reference: A better version of my example would be the
following because it would handle varargs:
import org.slf4j.NDC;
def withNdc =
{
String messagePattern, Object[] args ->
Closure operation=null;
if(args)
{
Hi Ceki,
I guess that a piece of actual code is the easiest way to explain what
I mean.
The following is valid Groovy code, using MDC as an example:
import org.slf4j.MDC;
def withValue =
{
String key, String value, Closure operation ->
MD
Hi Joern,
You are not beating a dead horse. There is no NDC in SLF4J because it is thought
that the MDC offers a better more general solution than the NDC.
However, I don't understand what you mean when you write:
slf4j.NDC("Parameter is {}.", obj)
What does the NDC offer that the MDC does n