Customize SLF4J Logger
<p>I'm trying to find a nice way to add a prefix to my logs without passing it on every calls, without instanciate Logger again.</p>

<p>The purpose is to trace Rest calls individually.
(The prefix would be re-generated on each call using UUID)</p>

<p>This would be like </p>

<pre><code>@RestController
class MyClass {
    //Here the prefix is initialise once
    //default value is X
    Logger LOG = LoggerFactory.getLogger(MyClass.class);

    @RequestMapping("/a")
    void methodA() {
        LOG.debug("foo");
    }   

    @RequestMapping("/b")
    void methodB() {    
        LOG.setPrefix("B");

        LOG.debug("bar");
}
</code></pre>

<p>with this output</p>

<pre><code>[...] [prefix X] foo
[...] [prefix B] bar
</code></pre>