Details
-
Bug
-
Resolution: Done
-
Critical
-
7.0.0.CR1
-
None
Description
I created a configuration to use asynchronous logging in standalone-ha.xml, and after successfully starting the server, running a test, and shutting it down, I could no longer restart the server without a parse error in standalone-ha.xml.
What is happening, is the file is being rewritten, and it is replacing the subhandlers element with a handlers element which is incorrect.
So, my configuration, that looks like this when I start the server:
<subsystem xmlns="urn:jboss:domain:logging:1.0">
<async-handler name="ASYNC">
<level name="INFO"/>
<queue-length value="1024"/>
<overflow-action value="BLOCK"/>
<subhandlers>
<handler name="FILE"/>
</subhandlers>
</async-handler>
<periodic-rotating-file-handler name="FILE" autoflush="true">
<level name="INFO"/>
<formatter>
<pattern-formatter pattern="%d
%-5p [%c] (%t) %s%E%n"/>
</formatter>
<file relative-to="jboss.server.log.dir" path="server.log"/>
<suffix value=".yyyy-MM-dd"/>
</periodic-rotating-file-handler>
<logger category="com.arjuna">
<level name="WARN"/>
</logger>
<logger category="org.apache.tomcat.util.modeler">
<level name="WARN"/>
</logger>
<logger category="sun.rmi">
<level name="WARN"/>
</logger>
<root-logger>
<level name="INFO"/>
<handlers>
<handler name="ASYNC"/>
</handlers>
</root-logger>
</subsystem>
ends up looking like this:
<subsystem xmlns="urn:jboss:domain:logging:1.0">
<async-handler name="ASYNC">
<level name="INFO"/>
<queue-length value="1024"/>
<overflow-action value="BLOCK"/>
<handlers>
<handler name="FILE"/>
</handlers>
</async-handler>
<periodic-rotating-file-handler name="FILE" autoflush="true">
<level name="INFO"/>
<formatter>
<pattern-formatter pattern="%d
%-5p [%c] (%t) %s%E%n"/>
</formatter>
<file relative-to="jboss.server.log.dir" path="server.log"/>
<suffix value=".yyyy-MM-dd"/>
</periodic-rotating-file-handler>
<logger category="com.arjuna">
<level name="WARN"/>
</logger>
<logger category="org.apache.tomcat.util.modeler">
<level name="WARN"/>
</logger>
<logger category="sun.rmi">
<level name="WARN"/>
</logger>
<root-logger>
<level name="INFO"/>
<handlers>
<handler name="ASYNC"/>
</handlers>
</root-logger>
</subsystem>
Which is wrong and fails parsing, which prevents the server from starting again, unless I hand edit the file again to correct it.