Jacob and Ceki, Thanks for the responses:<br><br><blockquote style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;" class="gmail_quote">Have you read the Jboss' documentation on logging [1]?
<br></blockquote><br>Yes I have. The sections 10.3.6 - 10.3.8 seem to be about specifying your own configuration file in the ear/war that log just your application's messages. The following seems like a good resource for that too but at this point I was taking the advice of not worrying about this as I am only running one ear per server. (
<a href="http://www.qos.ch/logging/sc.jsp">http://www.qos.ch/logging/sc.jsp</a>) I was trying to do something more like what is outlined in 10.3.1 of the JBoss wiki page where I modify the server's log4j config and add my config in there.
<br><br><blockquote style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;" class="gmail_quote">In particular, are you doing anything special to modify JBoss' classloading behavior?
<br></blockquote><br>No. I'm using a standard JBoss <a href="http://4.0.4.GA">4.0.4.GA</a> install.<br><br><blockquote style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;" class="gmail_quote">
Jacob Replied:<br>When you log to the console logger, it's logging stuff from one logger repository over the logging configuration<br>of another logger repository; hence both the "INFO" and "WARN" entries in one logging statement.
</blockquote><div><br>That makes sense. <br></div><br><blockquote style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;" class="gmail_quote">Now, as far as your logging configuration, have you tried to configure
<br>manaully or are you counting on automatic configuration occurring? For logger
<br>repositories other than the default, automatic configuration will not occur.
</blockquote><div><br>I was assuming that by not having a log4j config file or a log4j.jar in my ear, I could add my configurations to the server log4j file and have it ouput there but it doesn't seem to work the way I expected. Since I couldn't make that work I'm now trying to do it the other way and adding a
log4j.xml file to the war WEB-INF and the jar to the lib directory. What I don't know is how the slf4j stuff fits into this equation... do I need the backend selector jar packed into each war/ear so that the scoped classloader can route correctly? Here is what I am trying to configure now:
<br><br>Server code --> Log4J API --> (Jboss Log4j + server/conf/log4j.xml) --> server.log<br><br>App code (war) --> slf4j-log4j.jar --> slf4j-log4j.jar --> (war/WEB-INF/log4j.jar + war/WEB-INF/log4j.xml) -->
application.log<br><br>App code (some libs) --> jcl104-over-slf4j.jar -->
(war/WEB-INF/log4j.jar + war/WEB-INF/log4j.xml) --> application.log<br><br>App code (some libs) --> Log4j API directly -->
(war/WEB-INF/log4j.jar + war/WEB-INF/log4j.xml) --> application.log<br><br>So overall, there are 4 possible routes. Does this make sense with what JBoss does? I'm finding it really quite frustrating to configure because a
log4j.properties file in any jar included in your project from a 3rd party lib affects what comes out to the server.log. I really want log4j to ignore everything in the ear/war/jars and just use the container's configuration. There is no reason logging configuration decisions should be made when you package your application.
<br></div>