Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<ul> <li><a href="http://commons.apache.org/logging/" rel="noreferrer">commons-logging</a> and <a href="http://www.slf4j.org/" rel="noreferrer">SLF4J</a> are both API wrappers around other logging implementations. SLF4J is the more modern of the two, and rather more capable. <a href="http://logging.apache.org/log4j/1.2/index.html" rel="noreferrer">Log4j</a> is a logging implementation, and pretty much the defacto standard. <a href="http://java.sun.com/javase/6/docs/technotes/guides/logging/index.html" rel="noreferrer">JUL</a> (short for <code>java.util.logging</code>) is the (generally awful) logging implementation that comes with the JRE. Another log implementation is <a href="http://logback.qos.ch/" rel="noreferrer">logback</a>, which is slowly gaining traction, but not at all widespread yet.</li> <li><code>log4j.properties</code> and <code>log4j.xml</code> are different ways of configuring log4j, both are equally valid. Which one you use is up to you, although some application servers dictate one or the other. Read the <a href="http://logging.apache.org/log4j/1.2/manual.html" rel="noreferrer">log4j manual</a> to find out how to configure this.</li> <li>If Hibernate uses SLF4J as its API, that's the choice of the Hibernate developers. However, you can choose which logging implementation SLF4J will delegate to. Again, read the <a href="http://www.slf4j.org/docs.html" rel="noreferrer">slf4j manual</a> to find out how to select your chosen implementation.</li> </ul> <p>Yes, it's all rather confusing. Given an open choice, SLF4J and Logback is the most capable combination, but you usually don't get an open choice. Different frameworks (like Hibernate and Spring) will potentially use different logging APIs, usually commons-logging or SLF4J, but you can get all those APIs to eventually log to the same underlying implementation (usually log4j).</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload