5 Replies Latest reply on Jan 25, 2010 12:12 PM by Rocky S

    No log file created in jboss server 4.2.2.GA

    Rocky S Master

      when my AS is running, i can only see - C:\Users\rocky\Desktop\seaminaction\opt\jboss-as-4.2.2.GA\server\default\log

      boot.log

       

      whereas the only place i can see log is in the console of run.bat. But i am looking for a log file. can you please let me know such setting where should i enable to get the log file.

       

      thanks

        • 1. Re: No log file created in jboss server 4.2.2.GA
          Max Rydahl Andersen Master

          I believe that is covered in the user guide of JBoss AS, see http://docs.jboss.org/jbossas/getting_started/v4/html/tour.html

           

          the trick is to modify the log4j.xml file.

          • 2. Re: No log file created in jboss server 4.2.2.GA
            Rocky S Master
            thanks Max, let me check.
            • 3. Re: No log file created in jboss server 4.2.2.GA
              Rocky S Master

              I modified the jboss-log4j.xml file to no success.

               

              <?xml version="1.0" encoding="UTF-8"?>
              <!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
              <log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="true">

               

                  <!-- A time/date based rolling appender -->
                  <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="true"/>

               

                      <!-- Rollover at midnight each day -->
                      <param name="DatePattern" value="'.'yyyy-MM-dd"/>

               

                      <layout class="org.apache.log4j.PatternLayout">
                          <param name="ConversionPattern" value="%d{HH:mm:ss} %p [%c{6}] %m%n"/>
                          <!--
                          <param name="ConversionPattern" value="%d{HH:mm:ss} [%p] %c#%M@%L => %m%n"/>
                          -->
                      </layout>
                  </appender>

               

                  <!-- Console appender -->
                  <appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
                      <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
                      <param name="Target" value="System.out"/>
                      <!--
                      <param name="Threshold" value="INFO"/>
                      -->
                      <layout class="org.apache.log4j.PatternLayout">
                          <param name="ConversionPattern" value="%d{HH:mm:ss} %p [%c{6}] %m%n"/>
                          <!--
                          <param name="ConversionPattern" value="%d{HH:mm:ss} [%p] %c#%M@%L => %m%n"/>
                          -->
                      </layout>
                  </appender>

               

                  <!-- digester is way too whiny (needed if root log level is INFO) -->
                  <category name="org.apache.commons.digester.Digester">
                      <priority value="WARN" />
                  </category>

               

                  <!-- Tell us when Seam is initializing -->
                  <category name="javax.servlet.ServletContextListener">
                      <priority value="INFO" />
                  </category>

               

                  <!-- Tell us which components Seam is loading -->
                  <category name="org.jboss.seam.init.Initialization">
                      <priority value="INFO" />
                  </category>

               

                  <!-- log SQL queries -->
                  <!--
                  <category name="org.hibernate.SQL">
                      <priority value="DEBUG" />
                  </category>
                  -->

               

                  <!-- Tell us when JBoss AS has finished starting -->
                  <category name="org.jboss.system.server.Server">
                      <priority value="INFO" />
                  </category>

               

                  <category name="org.open18">
                      <priority value="DEBUG" />
                  </category>

               

                  <root>
                      <priority value="INFO"/>
                      <appender-ref ref="CONSOLE"/>
                      <!--
                      <appender-ref ref="FILE"/>
                      -->
                  </root>

               

              </log4j:configuration>

              • 4. Re: No log file created in jboss server 4.2.2.GA
                Max Rydahl Andersen Master
                Aman, its better to ask questions like this about JBoss AS in the jboss AS forums or through support.
                • 5. Re: No log file created in jboss server 4.2.2.GA
                  Rocky S Master

                  Thanks Max. I resolved the issue-

                  By uncommenting out-<appender-ref ref="FILE"/>

                  <root>
                          <priority value="INFO"/>
                          <appender-ref ref="CONSOLE"/>
                          <appender-ref ref="FILE"/>
                      </root>