我在群集中运行stadalone JBoss EAP 6.4。我会为每个应用程序提供日志文件。
我在应用程序Manifest Logging-Profile: das-log-profile
中添加了我在standalone-ha.xml中的内容:
{代码}
<subsystem xmlns="urn:jboss:domain:logging:1.5">
<console-handler name="CONSOLE">
<level name="INFO"/>
<formatter>
<named-formatter name="COLOR-PATTERN"/>
</formatter>
</console-handler>
<periodic-rotating-file-handler name="FILE" autoflush="true">
<formatter>
<named-formatter name="PATTERN"/>
</formatter>
<file relative-to="jboss.server.log.dir" path="server.log"/>
<suffix value=".yyyy-MM-dd"/>
<append value="true"/>
</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="org.jboss.as.config">
<level name="DEBUG"/>
</logger>
<logger category="sun.rmi">
<level name="WARN"/>
</logger>
<logger category="jacorb">
<level name="WARN"/>
</logger>
<logger category="jacorb.config">
<level name="ERROR"/>
</logger>
<logger category="org.jboss.security">
<level name="TRACE"/>
</logger>
<root-logger>
<level name="INFO"/>
<handlers>
<handler name="CONSOLE"/>
<handler name="FILE"/>
</handlers>
</root-logger>
<formatter name="PATTERN">
<pattern-formatter pattern="%d{HH:mm:ss,SSS} %-5p [%c] (%t) %s%E%n"/>
</formatter>
<formatter name="COLOR-PATTERN">
<pattern-formatter pattern="%K{level}%d{HH:mm:ss,SSS} %-5p [%c] (%t) %s%E%n"/>
</formatter>
<logging-profiles>
<logging-profile name="das-log-profile">
<file-handler name="das-log-handler" autoflush="true">
<level name="TRACE"/>
<file relative-to="jboss.server.log.dir" path="das.log"/>
</file-handler>
<logger category="ca.qc.gouv.msp.das" use-parent-handlers="false">
<level name="TRACE"/>
<handlers>
<handler name="das-log-handler"/>
</handlers>
</logger>
</logging-profile>
</logging-profiles>
</subsystem>
{代码}
有什么问题?日志文件das.log中没有记录 谢谢你的帮助。