1 Reply Latest reply on Jun 12, 2009 12:46 PM by Ronald van Kuijk

    Log4j is not outputting to my application specific log file

    Rizwan Newbie

      I have the following application entry in ../default/conf/jboss-log4j.xml:

          <appender name="APPENDER2" class="org.apache.log4j.DailyRollingFileAppender">
             <param name="Threshold" value="DEBUG"/>
              <param name="Append" value="true"/>
              <param name="File" value="${jboss.server.log.dir}/myApplication.log"/>
           <!-- roll over every day at midnight-->
              <param name="DatePattern" value="'.'yyyy-MM-dd"/>
              <layout class="org.apache.log4j.PatternLayout">
                  <param name="ConversionPattern" value="%d %-5p [%c] %m%n"/>
      <category name="com.myapp">
           <priority value="DEBUG" />
           <appender-ref ref="APPENDER2" />

      When server starts up, it does create 'myApplication.log' file under ../default/log, but there is absolutely nothing inside that file.
      I have tried adding different log levels info,debug etc. but no log is being produced.
      My application logs however can be seen in server.log file.
      Any solution to this would be appreciated.