title: JBoss AS 7: Logging
body: <p>I struggle a bit with JBoss AS7 and the logging. I cannot find anything related on the web despite the fact that my issue is a very general one. </p>
  
  <p>The default log looks currently like this:</p>
  
  <pre><code>11:57:29,950 INFO  [stdout] (http--0.0.0.0-8081-78) 248408930 [http--0.0.0.0-8081-78] INFO  org.apache.http.impl.client.DefaultHttpClient  - I/O exception (java.net.SocketException) caught when processing request: Connection reset
  11:57:29,950 INFO  [stdout] (http--0.0.0.0-8081-78) 248408930 [http--0.0.0.0-8081-78] INFO org.apache.http.impl.client.DefaultHttpClient  - Retrying request
  </code></pre>
  
  <p>notice the [stdout], those lines where written to stout by some logging library which is used by some library and picked up by JBoss and written to the log file. This is what i want to fix.</p>
  
  <p>I guess there must be a way to have an adapter which tells log4j (or any other logging framework) to log to the jboss logging subsystem?</p>
  
  <p>My first idea was to remove all log4j configuration from the classpath of my project. I found one in  a library i use which did log to stdout. But this does not fix anything.</p>
  
  <pre><code>11:21:01,648 ERROR [stderr] (http-localhost-127.0.0.1-8080-1) log4j:WARN No appenders could be found for logger (org.springframework.web.context.support.StandardServletEnvironment).
  11:21:01,648 ERROR [stderr] (http-localhost-127.0.0.1-8080-1) log4j:WARN Please initialize the log4j system properly.
  11:21:01,648 ERROR [stderr] (http-localhost-127.0.0.1-8080-1) log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
  </code></pre>
  
  <p>The usual error message when no appender is configured. At least i can be sure that no configuration is in the classpath anymore.</p>
  
  <p>The JBoss AS documentation does not even mention this kind of scenario, how i am supposed to use 3rd party libraries when i am not able to get proper logging?</p>
  
  <p>I really hope someone can help me out, any hint is appreciated!</p>
  
  <p>Malax</p>