4 Replies Latest reply on May 14, 2008 1:31 PM by Elias Ross

    Logging into separate Files

    Andreas Groscurth Newbie


      i want to log the web applications into separate files. I found the documentation about how to do that in the jboss wiki and it works.

      <appender name="App1Log" class="org.apache.log4j.FileAppender">
       <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
       <param name="Append" value="false"/>
       <param name="File" value="${jboss.server.home.dir}/log/app1.log"/>
       <layout class="org.apache.log4j.PatternLayout">
       <param name="ConversionPattern" value="%d{ABSOLUTE} %-5p [%c{1}] %m%n"/>
       <filter class="org.jboss.logging.filter.TCLFilter">
       <param name="AcceptOnMatch" value="true"/>
       <param name="DeployURL" value="app1.ear"/>
       <appender-ref ref="CONSOLE"/>
       <appender-ref ref="FILE"/>
       <appender-ref ref="App1Log"/>

      The problem is - it still logs on the console (server.log respectively).

      What do i have to do that it logs only in the given file (using categories is not possible, because several applications using shared libraries) ?

      And how do i set the log level in that system ?