<div dir="ltr">Hi guys,<div><br></div><div>[[I crawled the archive a bit, and wrote here as jboss-as-dev seems inactive. If it&#39;s the wrong list here to talk about an old version of jboss/wildfly, just let me know.]]</div>

<div><br></div><div>I was recently trying to customize the output of JBoss 7 (EAP6.1) in our development environment. </div><div>We&#39;re currently seeing what IMO is far too many logs at the beginning of the server (about 3.5k lines, and too many logs kills the logs :-)).</div>

<div><br></div><div>We&#39;d like to configure the root-logger at ERROR level, and redefine our root package at just WARN.</div><div>Then, we particularly want to keep two INFO logs from JBoss: starting/finished starting[error or not].<br>

</div><div><span style="font-size:x-small"><br></span></div><div><span style="font-size:x-small">15:47:29,652 INFO  [org.jboss.as.server.</span><span style="font-size:x-small">ApplicationServerService] [-][] (MSC service thread 1-7) JBAS015899: JBoss EAP</span><span style="font-size:x-small"> </span><a href="http://6.1.1.ga/" target="_blank" style="font-size:x-small">6.1.1.GA</a><span style="font-size:x-small"> </span><span style="font-size:x-small">(AS 7.2.1.Final-redhat-10) démarre</span><br>

</div><div><span style="font-size:x-small">15:48:00,789 INFO  [org.jboss.as.server.</span><span style="font-size:x-small">BootstrapListener] [-][] (Controller Boot Thread) JBAS015874: JBoss EAP</span><span style="font-size:x-small"> </span><a href="http://6.1.1.ga/" target="_blank" style="font-size:x-small">6.1.1.GA</a><span style="font-size:x-small"> </span><span style="font-size:x-small">(AS 7.2.1.Final-redhat-10) a démarré en 32035ms - 5898 sur 6139 services ont démarré (229 services sont passifs ou à la demande)</span></div>


<div><br></div><div>To achieve that, someone previously configured <a href="http://org.jboss.as">org.jboss.as</a> logger at the INFO level. BUT, as this is a parent package of almost anything in the server, this seems to activate a lot of other logs (some from org.jboss.as.clustering.foo, org.jboss.as.naming.bar to name a few).</div>

<div><br></div><div>So, I naively first tried configuring the FQN being displayed org.jboss.as.server.ApplicationServerService and org.jboss.as.server.BootstrapListener, and realized this did not change anything.<br></div>


<div><br></div><div>After a quick look in the code, I saw that loggers in jboss/wildfly actually don&#39;t seem to use the class the logs are being emitted from as often elsewhere, but some specially Logger instances defined in some central class (like <a href="https://github.com/wildfly/wildfly/blob/7.1/server/src/main/java/org/jboss/as/server/ServerLogger.java" target="_blank">https://github.com/wildfly/wildfly/blob/7.1/server/src/main/java/org/jboss/as/server/ServerLogger.java</a> for example).</div>


<div><br></div><div>ApplicationServerService [1] and BootstrapListener[2], for instance, actually log the server through the ServerLogger.AS_ROOT_LOGGER[3] instance.</div><div><br></div><div>And AS_ROOT_LOGGER is &quot;bound&quot; to org.jboss.as... I&#39;m stuck. I have to activate <a href="http://org.jboss.as" target="_blank">org.jboss.as</a> to see the starting logs, but at the same time enabling other logs.</div>

<div>Btw, why do those logs get sent through ServerLogger.AS_ROOT_LOGGER (<a href="http://org.jboss.as">org.jboss.as</a>) instead of ServerLogger.ROOT_LOGGER (org.jboss.as.server)? Was it actually made on purpose?</div><div>

<br></div><div>A possible solution I see might be to redefine some org.jboss.as.foo package at a higher level than INFO in my standalone.xml, but this seems a bit cumbersome.</div><div><br></div><div>Did I understand how logging inside as/wildfly work correctly? Do you see another way to achieve what I say above?</div>

<div><br></div><div>Thanks a lot for any hint.</div><div><br></div><div>[1] <a href="https://github.com/wildfly/wildfly/blob/7.1/server/src/main/java/org/jboss/as/server/ApplicationServerService.java#L96" target="_blank">https://github.com/wildfly/wildfly/blob/7.1/server/src/main/java/org/jboss/as/server/ApplicationServerService.java#L96</a></div>


<div>[2] <a href="https://github.com/wildfly/wildfly/blob/7.1/server/src/main/java/org/jboss/as/server/BootstrapListener.java#L157">https://github.com/wildfly/wildfly/blob/7.1/server/src/main/java/org/jboss/as/server/BootstrapListener.java#L157</a><br>

</div>
<div><div>[3] <a href="https://github.com/wildfly/wildfly/blob/7.1/server/src/main/java/org/jboss/as/server/ServerLogger.java#L66" target="_blank">https://github.com/wildfly/wildfly/blob/7.1/server/src/main/java/org/jboss/as/server/ServerLogger.java#L66</a></div>

</div><div><br></div><div>-- Baptiste</div></div>