We am using JBoss 7 in our project and have written the logging configuration in standalone.xml
file like this,
<subsystem xmlns="urn:jboss:domain:logging:1.0">
.
.
.
<logger category="com.xyz.abc.aspect">
<level name="DEBUG"/>
<handlers>
<handler name="FILE"/>
</handlers>
</logger>
.
.
</subsystem>
Now a situation has arose that i wanted to change the logging configuration by adding use-parent-handlers="false"
to avoid the log being redirected to parent handler , now when i add this to standalone.xml
<logger category="com.xyz.abc.aspect" use-parent-handlers="false">
<level name="DEBUG"/>
<handlers>
<handler name="FILE"/>
</handlers>
</logger>
and restart the server the logging configuration is reverted back by JBoss to the previous state i.e
<logger category="com.xyz.abc.aspect">
<level name="DEBUG"/>
<handlers>
<handler name="FILE"/>
</handlers>
</logger>
I have tried deleting standalone_xml_history directory and files under it , but nothing is preventing the overwriting behaviour, can any one please suggest.
I'm not 100% sure, but restarting the server probably causes a write-back action of the config. That means your config gets overwritten by with the "current" config the server knows which is the version before you edited the file. You could simply use the management console
confguration > core > loggingor use the CLI
/subsystem=logging/logger=change.me.please:write-attribute(name="use-parent-handlers", value="false")to make those changes.
Alternatively change the config file when the server is stopped.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With