0

I am upgrading to JBoss7 and I want to create the appender that that will filter by the deployed WAR name. The configuration I have now:

<appender name="..." class="org.jboss.logging.appender.RollingFileAppender">
    <param name="File" value="${jboss.server.log.dir}/warname.log"/>
    <param name="Append" value="true"/>
    <param name="MaxFileSize" value="10000KB"/>
    <param name="MaxBackupIndex" value="5"/>
    <filter class="org.jboss.logging.filter.TCLMCFilter">
        <param name="acceptOnMatch" value="true"/>
        <param name="deployURL" value="warname.war"/>
    </filter>
</appender>

Looked at https://docs.jboss.org/author/display/AS71/Logging+Configuration but did not found how to do it.

Added

I want to get functionality similar as described here but in JBoss7: https://community.jboss.org/wiki/SeparatingApplicationLogs

According to Schema http://www.jboss.org/schema/jbossas/jboss-as-logging_1_1.xsd it is not possible (see below). Will be happy for any suggestions how to do it in JBoss7.

<xs:group name="simpleFilterGroup">
    <xs:choice>
        <xs:element name="all" type="multiFilterType"/>
        <xs:element name="any" type="multiFilterType"/>
        <xs:element name="accept"/>
        <xs:element name="deny"/>
        <xs:element name="not" type="filterType"/>
        <xs:element name="match" type="regexFilterType"/>
        <xs:element name="replace" type="replaceFilterType"/>
        <xs:element name="level" type="levelFilterType"/>
        <xs:element name="level-range" type="levelRangeFilterType"/>
        <xs:element name="change-level" type="levelChangeFilterType"/>
    </xs:choice>
</xs:group>
Michael
  • 10,063
  • 18
  • 65
  • 104
  • There is also an option to add log4j to your app -> exclude jboss log4j module -> configure logging directly in app. But you will loose central logs management via jboss console. – iskramac Oct 04 '13 at 18:47
  • Any case, `org.jboss.logging.filter.TCLMCFilter` is not in JBoss7 – Michael Oct 06 '13 at 06:59

0 Answers0