[
https://jira.jboss.org/jira/browse/JBAS-6205?page=com.atlassian.jira.plug...
]
Brian Stansberry closed JBAS-6205.
----------------------------------
Resolution: Done
The server.log threshold can be controlled as follows:
./run.sh -Djboss.server.log.threshold=WARN
The default if the system property is not set is currently DEBUG. This can be changed via
a new mbean attribute added to conf/jboss-service.xml:
<mbean code="org.jboss.logging.Log4jService"
name="jboss.system:type=Log4jService,service=Logging"
xmbean-dd="resource:xmdesc/Log4jService-xmbean.xml">
<attribute
name="ConfigurationURL">resource:jboss-log4j.xml</attribute>
<!-- Set the org.apache.log4j.helpers.LogLog.setQuiteMode. As of log4j1.2.8
this needs to be set to avoid a possible deadlock on exception at the
appender level. See bug#696819.
-->
<attribute name="Log4jQuietMode">true</attribute>
<!-- How frequently in seconds the ConfigurationURL is checked for changes
-->
<attribute name="RefreshPeriod">60</attribute>
<!-- The value to assign to system property jboss.server.log.threshold
if it is not already set. This system property in turn controls
the logging threshold for the server.log file.
If the system property is already set when this service is created,
this value is ignored. -->
<attribute
name="DefaultJBossServerLogThreshold">DEBUG</attribute>
</mbean>
Make server.log logging level configurable via system property
--------------------------------------------------------------
Key: JBAS-6205
URL:
https://jira.jboss.org/jira/browse/JBAS-6205
Project: JBoss Application Server
Issue Type: Feature Request
Security Level: Public(Everyone can see)
Components: Logging
Reporter: Brian Stansberry
Assignee: Brian Stansberry
Fix For: JBossAS-5.0.0.GA
Add <param name="Threshold"
value="${jboss.server.log.threshold}"/> to the FILE appender config in
jboss-log4j.xml.
Log4j performs a system property substitution (see
org.apache.log4j.xml.DomConfigurator.subst()). It doesn't seem to support our default
value syntax, e.g. {jboss.server.log.threshold:DEBUG}, but starting the AS w/o setting the
system property results in DEBUG logging.
If we want a default other than DEBUG (or don't like counting on log4j to use DEBUG
if the property isn't set), we can check the system property in Log4jService and set
it if not set.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira