0 Replies Latest reply on Apr 24, 2010 10:56 AM by vasuki hn

    how to put logs into log file

    vasuki hn Newbie

      Hello,


      I am using Jboss 4.2 server and jboss-log4j.xml is used for logging. I have created the file appender.
      My question is how to log my application logs to the log file which i have given the details in file appender.


      My jboss-log4j.xml file details is as follows:




      <?xml version="1.0" encoding="UTF-8"?>
      <!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
      <log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="false">
       <appender name="FILE" class="org.jboss.logging.appender.DailyRollingFileAppender">
            <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
            <param name="File" value="${jboss.server.log.dir}/server.log"/>
            <param name="Append" value="false"/>
      
            <param name="DatePattern" value="'.'yyyy-MM-dd"/>
      
            <layout class="org.apache.log4j.PatternLayout">
               <param name="ConversionPattern" value="%d %-5p [%c] %m%n"/>
      
              
            </layout>
         </appender>
      
      <category name="org.domain.user.session">
            <priority value="INFO"/>
         </category>
         
         <category name="org.domain.user.entity">
            <priority value="INFO"/>
         </category>
            
      <root>
            <appender-ref ref="FILE"/>
         </root>
      
      </log4j:configuration>





      In the configuration file, org.domain.user.entity and org.domain.user.session are the package where i have my java files and used @Logger to create logs.


      But i dont see any those logs in log file.
      Please help me in changing the log configuration file.


      Thanks
      Vasuki