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.
The default log looks currently like this:
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
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.
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?
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.
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.
The usual error message when no appender is configured. At least i can be sure that no configuration is in the classpath anymore.
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?
I really hope someone can help me out, any hint is appreciated!
Malax