0 Replies Latest reply on Oct 4, 2013 7:02 AM by Michael Furman

    JBoss7 logging: How is possible to create appender that will filter by the deployed WAR name?

    Michael Furman Newbie

      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.

       

      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>