<div dir="ltr">There are four primary backends for logging that I know of (in historical order of appearance):<div><br></div><div>* Log4j 1.x</div><div>* java.util.logging</div><div>* Logback</div><div>* Log4j 2.x</div><div><br></div><div>On the other hand, there are "frontends" for logging which generally fall into Commons Logging, SLF4J, and Log4j 2.x. Log4j 1.x presented a bit of a hybrid approach just like java.util.logging. The frontends will work with any backend in practice, and any backend can be configured for any frontend, but in general, you should stick to one backend per application so that all frontends use the same backend.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On 18 March 2017 at 19:34, Joachim Durchholz <span dir="ltr"><<a href="mailto:jo@durchholz.org" target="_blank">jo@durchholz.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">Am 18.03.2017 um 23:24 schrieb Adam Gent:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
However I do think I have a strong understanding of what SLF4J does<br>
</blockquote>
<br></span>
You're talking about a chicken/egg problem where nobody else sees it, and your statements didn't match with what I know about the internals so either the statements or your understanding are incomplete.<span class=""><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
It just feels wrong to make<br>
Appenders or whatever logging framework specific code to do that sort<br>
of initialization.<br>
</blockquote>
<br></span>
Sure, appenders shouldn't be doing anything beyond appending log messages to whatever output media they are writing to.<span class=""><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
How do you configure your logging framework? We have code that presets<br>
System.properties (since sadly system.properties is the universal<br>
config) before the logging framework. Do you just hard code it and<br>
rely on some external mechanism for collecting logs?<br>
</blockquote>
<br></span>
Usually I just use logback and configure it.<br>
Unless I'm inside a container, where the container has a preinstalled and (hopefully) preconfigured logging backend.<span class=""><br>
<br>
> Remember I'm<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
dealing with several logging backends.<br>
</blockquote>
<br></span>
With SLF4J, you do not need multiple backends.<br>
I'd be pretty unsurprised if SLF4J even prevented you from doing that.<br>
<br>
Maybe we have a terminology difference?<br>
My definition of "backend" is "any of java.util.logging, log4j, commons logging, or similar".<div class="HOEnZb"><div class="h5"><br>
______________________________<wbr>_________________<br>
slf4j-user mailing list<br>
<a href="mailto:slf4j-user@qos.ch" target="_blank">slf4j-user@qos.ch</a><br>
<a href="http://mailman.qos.ch/mailman/listinfo/slf4j-user" rel="noreferrer" target="_blank">http://mailman.qos.ch/mailman/<wbr>listinfo/slf4j-user</a></div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">Matt Sicker <<a href="mailto:boards@gmail.com" target="_blank">boards@gmail.com</a>></div>
</div>