EOS自带的JBOSS325和目前的JBOSS版本是有不小的区别的,本文主要介绍EOS部署在JBOSS4以上版本的配置技巧
| ERROR: invalid console appender config detected, console stream is looping |
1、配置介绍
日志的配置
JBOSS4集成了log4j,所以在启动eos后,发现日志出现一下错误:ERROR: invalid console appender config detected, console stream is looping
这主要是EOS应用自己的 log4j和jboss集成的log4j冲突,解决方法是:
使用jboss的log4j,转移eos的log配置到jboss的 server/default/conf/log4j.xml里:类似以下配置:
|
<appender class="org.jboss.logging.appender.RollingFileAppender" name="R"> <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/> <param name="File" value="${EOS_HOME}/logs/eoslog.log"/> <param name="Append" value="true"/> <param name="MaxFileSize" value="5000KB"/> <param name="MaxBackupIndex" value="50"/> <layout class="org.apache.log4j.PatternLayout"> <param name="ConversionPattern" value="%d %-5p [%c] %m%n"/> </layout> </appender> <logger name="defaultAppID.com.primeton.tp.core.bizservice"> <level value="DEBUG" /> <appender-ref ref="R" /> </logger> |
修改server/default/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:log4j.xml</attribute> <attribute name="CatchSystemOut">false</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> </mbean> |
修改server/default/deploy/jbossweb-tomcat55.sar/META-INF/jboss-service.xml
|
<attribute name="Java2ClassLoadingCompliance">true</attribute> <!—— A flag indicating if the JBoss Loader should be used. This loader uses a unified class loader as the class loader rather than the tomcat specific class loader. The default is false to ensure that wars have isolated class loading for duplicate jars and jsp files. ——> <attribute name="UseJBossWebLoader">true</attribute> |
共2页 1 2






