title: Spring behind the scenes logging
body: <p>I use <code>log4j2</code> and I can't get logging from spring.
  when I write my own <code>logger.debug(...);</code> it works but it's the same as <code>System.out.println(...);</code>.  </p>
  
  <p>I want to know what happened behind the scenes in spring. show the created bean or debuggig error like 400 ... </p>
  
  <p>I try this Conf but nothing happened :</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;Configuration status="INFO"&gt;
      &lt;Appenders&gt;
          &lt;Console name="CONSOLE" target="SYSTEM_OUT"&gt;
              &lt;PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n" /&gt;
          &lt;/Console&gt;
      &lt;/Appenders&gt;
      &lt;Loggers&gt;
  
          &lt;Root level="ALL"&gt;
              &lt;AppenderRef ref="CONSOLE"/&gt;
          &lt;/Root&gt;
  
          &lt;logger name="org.springframework" level="ALL"&gt;
              &lt;appender-ref ref="CONSOLE"/&gt;
          &lt;/logger&gt;
  
  
          &lt;logger name="org.springframework.web.servlet.mvc.support.DefaultHandlerExceptionResolver"  level="ALL"&gt;
              &lt;appender-ref ref="CONSOLE"/&gt;
          &lt;/logger&gt;
  
          &lt;logger name="org.springframework.beans.factory.support.DefaultListableBeanFactory"  level="ALL"&gt;
              &lt;appender-ref ref="CONSOLE"/&gt;
          &lt;/logger&gt;
  
      &lt;/Loggers&gt;
  &lt;/Configuration&gt;
  </code></pre>
  
  <p>pom.xml</p>
  
  <pre><code>&lt;!-- log4j2 --&gt;
  
  &lt;dependency&gt;
      &lt;groupId&gt;org.apache.logging.log4j&lt;/groupId&gt;
      &lt;artifactId&gt;log4j-api&lt;/artifactId&gt;
      &lt;version&gt;2.0-rc2&lt;/version&gt;
  &lt;/dependency&gt;
  &lt;dependency&gt;
      &lt;groupId&gt;org.apache.logging.log4j&lt;/groupId&gt;
      &lt;artifactId&gt;log4j-core&lt;/artifactId&gt;
      &lt;version&gt;2.0-rc2&lt;/version&gt;
  &lt;/dependency&gt;   
  &lt;dependency&gt;
      &lt;groupId&gt;org.apache.logging.log4j&lt;/groupId&gt;
      &lt;artifactId&gt;log4j-web&lt;/artifactId&gt;
      &lt;version&gt;2.0-rc2&lt;/version&gt;
      &lt;scope&gt;runtime&lt;/scope&gt;
  &lt;/dependency&gt;
  &lt;dependency&gt;
       &lt;groupId&gt;org.apache.logging.log4j&lt;/groupId&gt;
       &lt;artifactId&gt;log4j-jcl&lt;/artifactId&gt;
       &lt;version&gt;2.0-rc2&lt;/version&gt;
   &lt;/dependency&gt;
  </code></pre>
  
  <p>Startup log :</p>
  
  <pre><code>juil. 09, 2014 4:42:57 PM org.apache.catalina.core.AprLifecycleListener init
  Infos: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jdk1.7.0_45\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:/Program Files/Java/jre7/bin/client;C:/Program Files/Java/jre7/bin;C:/Program Files/Java/jre7/lib/i386;C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Broadcom\Broadcom 802.11\Driver;D:\apache-maven-3.1.1\bin;C:\wamp\bin\mysql\mysql5.5.24\bin;C:\Program Files\Java\jdk1.7.0_45\bin;;D:\AO Project\eclipse;;.
  juil. 09, 2014 4:42:57 PM org.apache.tomcat.util.digester.SetPropertiesRule begin
  Avertissement: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:AO' did not find a matching property.
  juil. 09, 2014 4:42:57 PM org.apache.coyote.AbstractProtocol init
  Infos: Initializing ProtocolHandler ["http-nio-8080"]
  juil. 09, 2014 4:42:57 PM org.apache.tomcat.util.net.NioSelectorPool getSharedSelector
  Infos: Using a shared selector for servlet write/read
  juil. 09, 2014 4:42:57 PM org.apache.coyote.AbstractProtocol init
  Infos: Initializing ProtocolHandler ["ajp-nio-8009"]
  juil. 09, 2014 4:42:57 PM org.apache.tomcat.util.net.NioSelectorPool getSharedSelector
  Infos: Using a shared selector for servlet write/read
  juil. 09, 2014 4:42:57 PM org.apache.catalina.startup.Catalina load
  Infos: Initialization processed in 670 ms
  juil. 09, 2014 4:42:57 PM org.apache.catalina.core.StandardService startInternal
  Infos: Démarrage du service Catalina
  juil. 09, 2014 4:42:57 PM org.apache.catalina.core.StandardEngine startInternal
  Infos: Starting Servlet Engine: Apache Tomcat/8.0.9
  juil. 09, 2014 4:43:02 PM org.apache.catalina.core.ApplicationContext log
  Infos: Log4jServletContainerInitializer starting up Log4j in Servlet 3.0+ environment.
  juil. 09, 2014 4:43:03 PM org.apache.catalina.core.ApplicationContext log
  Infos: No Spring WebApplicationInitializer types detected on classpath
  SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
  SLF4J: Defaulting to no-operation (NOP) logger implementation
  SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
  juil. 09, 2014 4:43:03 PM org.apache.catalina.core.ApplicationContext log
  Infos: Initializing Spring root WebApplicationContext
  juil. 09, 2014 4:43:04 PM org.hibernate.jpa.internal.util.LogHelper logPersistenceUnitInformation
  INFO: HHH000204: Processing PersistenceUnitInfo [
      name: persistenceYous
      ...]
  juil. 09, 2014 4:43:05 PM org.hibernate.Version logVersion
  INFO: HHH000412: Hibernate Core {4.3.5.Final}
  juil. 09, 2014 4:43:05 PM org.hibernate.cfg.Environment &lt;clinit&gt;
  INFO: HHH000206: hibernate.properties not found
  juil. 09, 2014 4:43:05 PM org.hibernate.cfg.Environment buildBytecodeProvider
  INFO: HHH000021: Bytecode provider name : javassist
  juil. 09, 2014 4:43:06 PM org.hibernate.annotations.common.reflection.java.JavaReflectionManager &lt;clinit&gt;
  INFO: HCANN000001: Hibernate Commons Annotations {4.0.4.Final}
  juil. 09, 2014 4:43:06 PM org.hibernate.dialect.Dialect &lt;init&gt;
  INFO: HHH000400: Using dialect: org.hibernate.dialect.MySQL5Dialect
  juil. 09, 2014 4:43:07 PM org.hibernate.hql.internal.ast.ASTQueryTranslatorFactory &lt;init&gt;
  INFO: HHH000397: Using ASTQueryTranslatorFactory
  juil. 09, 2014 4:43:11 PM org.apache.catalina.core.ApplicationContext log
  Infos: Log4jServletContextListener ensuring that Log4j starts up properly.
  juil. 09, 2014 4:43:11 PM org.apache.catalina.core.ApplicationContext log
  Infos: Log4jServletFilter initialized.
  juil. 09, 2014 4:43:11 PM org.apache.catalina.core.ApplicationContext log
  Infos: Initializing Spring FrameworkServlet 'mvc-dispatcher'
  juil. 09, 2014 4:43:13 PM org.apache.coyote.AbstractProtocol start
  Infos: Starting ProtocolHandler ["http-nio-8080"]
  juil. 09, 2014 4:43:13 PM org.apache.coyote.AbstractProtocol start
  Infos: Starting ProtocolHandler ["ajp-nio-8009"]
  juil. 09, 2014 4:43:13 PM org.apache.catalina.startup.Catalina start
  Infos: Server startup in 15715 ms
  </code></pre>