Application Server 3  4  5 and 6
  1. Application Server 3 4 5 and 6
  2. JBAS-6532

TCLFilter doesn't work in jboss 5 with war's in any documented way

    Details

    • Type: Bug Bug
    • Status: Closed Closed (View Workflow)
    • Priority: Major Major
    • Resolution: Done
    • Affects Version/s: JBossAS-5.0.0.GA
    • Fix Version/s: 6.0.0.M1
    • Component/s: Logging
    • Security Level: Public (Everyone can see)
    • Labels:
      None
    • Environment:
      jdk 6, linux
    • Similar Issues:
      Show 10 results 

      Description

      Reading this doc:

      http://www.jboss.org/community/docs/DOC-12203

      Indicates a *-exp.war syntax is needed for TCLFilter war use, but there are no files of that type on my system running jboss 5. I've tried all the possible combinations I can think of, posted the problem to the forum, and the result is always that the file sizes and contents of the log files generated are exactly the same for the different war's, ie, no separated content. Here's my current config:

      <appender name="penguinLog" class="org.apache.log4j.FileAppender">
      <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"></errorHandler>
      <param name="Append" value="false"/>
      <param name="File" value="$

      {jboss.server.home.dir}/log/penguinLog.log"/>
      <layout class="org.apache.log4j.PatternLayout">
      <param name="ConversionPattern" value="%d %-5p %c{1} %m%n"/>
      </layout>
      <filter class="org.jboss.logging.filter.TCLFilter">
      <param name="AcceptOnMatch" value="true"/>
      <param name="DeployURL" value="penguin"/>
      </filter>
      </appender>

      <appender name="wtfLog" class="org.apache.log4j.FileAppender">
      <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"></errorHandler>
      <param name="Append" value="false"/>
      <param name="File" value="${jboss.server.home.dir}

      /log/wtfLog.log"/>
      <layout class="org.apache.log4j.PatternLayout">
      <param name="ConversionPattern" value="%d %-5p %c

      {1}

      %m%n"/>
      </layout>
      <filter class="org.jboss.logging.filter.TCLFilter">
      <param name="AcceptOnMatch" value="true"/>
      <param name="DeployURL" value="wtf-exp.war"/>
      </filter>
      </appender>

      <root>
      <appender-ref ref="CONSOLE"/>
      <appender-ref ref="FILE"/>
      <appender-ref ref="penguinLog"/>
      <appender-ref ref="wtfLog"/>
      </root>

      1. JBAS-6532.patch
        3 kB
        jaikiran pai
      2. JBAS-6532-test.patch
        11 kB
        jaikiran pai

        Issue Links

          Activity

          Hide
          jaikiran pai
          added a comment -

          Fixed in r96446.

          The newly introduced org.jboss.logging.filter.TCLMCFilter can now be used for this functionality. More details will be added to the wiki http://www.jboss.org/community/wiki/SeparatingApplicationLogs

          Show
          jaikiran pai
          added a comment - Fixed in r96446. The newly introduced org.jboss.logging.filter.TCLMCFilter can now be used for this functionality. More details will be added to the wiki http://www.jboss.org/community/wiki/SeparatingApplicationLogs
          Hide
          Brian Stansberry
          added a comment -

          Jaikiran, does this need porting to trunk?

          Show
          Brian Stansberry
          added a comment - Jaikiran, does this need porting to trunk?
          Hide
          Brian Stansberry
          added a comment -

          David Lloyd tells me TCLFilter shouldn't be used in AS6M2+, so never mind.

          Show
          Brian Stansberry
          added a comment - David Lloyd tells me TCLFilter shouldn't be used in AS6M2+, so never mind.
          Hide
          jaikiran pai
          added a comment -

          For the benefit of others watching this JIRA - In AS trunk (6.0.0.M2 and later) the ability to log to separate log files, per application will be implemented in a different way. TCLFilter will no longer apply there.

          Show
          jaikiran pai
          added a comment - For the benefit of others watching this JIRA - In AS trunk (6.0.0.M2 and later) the ability to log to separate log files, per application will be implemented in a different way. TCLFilter will no longer apply there.
          Hide
          Stéphane Raban
          added a comment -

          The TCLMCFilter doesn't even work with WAR files in JBoss 5.1.0.GA

          When several applications are deployed on the default instance server on jboss 5.1.0.GA it is not possible to separate logs in different files with log4j
          All applications will log in all different files.

          The filter TCLMCFIlter doesn't work, it lets everything through (like the old TCLFilter).
          The class TCLMCFIlter.java has to be modify, there is a problem with the classloader, the methode getURLs doesn't work with 5.1.0, only for 5.0.0 version.
          Then, filetring logj4 logging on war name is not possible :

          Example :

          <filter class="org.jboss.logging.filter.TCLFilter">
          <param name="AcceptOnMatch" value="true"/>
          <param name="DeployURL" value="wtf-exp.war"/>
          </filter>
          Could we do a new patch for the branch 5.1.0.GA ?

          Relatives issues :
          ---------------------------
          https://issues.jboss.org/browse/JBAS-6532
          https://issues.jboss.org/browse/ORG-1259

          Forum:
          http://community.jboss.org/wiki/SeparatingApplicationLogs#comment-8603

          Show
          Stéphane Raban
          added a comment - The TCLMCFilter doesn't even work with WAR files in JBoss 5.1.0.GA When several applications are deployed on the default instance server on jboss 5.1.0.GA it is not possible to separate logs in different files with log4j All applications will log in all different files. The filter TCLMCFIlter doesn't work, it lets everything through (like the old TCLFilter). The class TCLMCFIlter.java has to be modify, there is a problem with the classloader, the methode getURLs doesn't work with 5.1.0, only for 5.0.0 version. Then, filetring logj4 logging on war name is not possible : Example : <filter class="org.jboss.logging.filter.TCLFilter"> <param name="AcceptOnMatch" value="true"/> <param name="DeployURL" value="wtf-exp.war"/> </filter> Could we do a new patch for the branch 5.1.0.GA ? Relatives issues : --------------------------- https://issues.jboss.org/browse/JBAS-6532 https://issues.jboss.org/browse/ORG-1259 Forum: http://community.jboss.org/wiki/SeparatingApplicationLogs#comment-8603

            People

            • Assignee:
              jaikiran pai
              Reporter:
              robert lazarski
            • Votes:
              5 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: