Results 1 to 2 of 2
  1. #1
    hugomx is offline Member
    Join Date
    Jul 2011
    Posts
    3
    Rep Power
    0

    Default Write a log for app jboss

    Hi! all

    I want JBoss logging writes a log for an app, the server supports many apps
    This is xml configuration for jboss-log4j.xml

    The problem is the log file for the sever is writing a huge file log more than 800Mb and I dont know where is the mistake

    Thanks in advance

    Java Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
    <!-- ===================================================================== -->
    <!--  Log4j Configuration                                                  -->
    <!-- ===================================================================== -->
    <!-- $Id: jboss-log4j.xml 62403 2007-04-18 15:26:43Z dimitris@jboss.org $ -->
    
    <log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="false">
       <!-- ================================= -->
       <!-- log de jboss                      -->    
       <!-- ================================= -->
       <!-- 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="d:/logs/JBoss/server.log"/>
          <param name="Append" value="false"/>
          <!-- Rollover at midnight each day -->
          <param name="DatePattern" value="'.'yyyy-MM-dd"/>
          <!-- Rollover at the top of each hour
          <param name="DatePattern" value="'.'yyyy-MM-dd-HH"/> -->
    
          <layout class="org.apache.log4j.PatternLayout">
             <!-- The default pattern: Date Priority [Category] Message\n -->
             <param name="ConversionPattern" value="%d %-5p [%c] %m%n"/>
             <!-- The full pattern: Date MS Priority [Category] (Thread:NDC) Message\n
             <param name="ConversionPattern" value="%d %-5r %-5p [%c] (%t:%x) %m%n"/> -->
          </layout>
       </appender>
    
    
       <!-- ============================== -->
       <!-- log de la consola              -->
       <!-- ============================== -->
    
       <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">
             <!-- The default pattern: Date Priority [Category] Message\n -->
             <param name="ConversionPattern" value="%d{ABSOLUTE} %-5p [%c{1}] %m%n"/>
          </layout>
       </appender>
      
       <!-- ====================== -->
       <!-- log gps ws -->
       <!-- ====================== -->
       
          <appender name="GPSWS" class="org.jboss.logging.appender.DailyRollingFileAppender">
          <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
          <param name="File" value="d:/logs/gpsws/gpsws.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> 
    
    	
    
       
       
       <!-- ================ -->
       <!-- Limit categories -->
       <!-- ================ -->
    
       <!-- Limit the org.apache category to INFO as its DEBUG is verbose -->
       <category name="org.apache">
          <priority value="INFO"/>
       </category>
    
       <!-- Limit the org.jboss.serial (jboss-serialization) to INFO as its DEBUG is verbose -->
       <category name="org.jboss.serial">
          <priority value="INFO"/>
       </category>
    
       <!-- Limit the org.jgroups category to WARN as its INFO is verbose -->
       <category name="org.jgroups">
          <priority value="WARN"/>
       </category>
    
       <!-- Limit the jacorb category to WARN as its INFO is verbose -->
       <category name="jacorb">
          <priority value="WARN"/>
       </category>
    
      
    
       <!-- Limit the JSR77 categories -->
       <category name="org.jboss.management">
          <priority value="INFO"/>
       </category>
    
       
       <category name="scm.gpsws" additivity="false">
         <priority value="INFO" />
         <appender-ref ref="GPSWS"/>
       </category>
    
     
    
       <!-- ======================= -->
       <!-- Setup the Root category -->
       <!-- ======================= -->
    
       <root>
          <appender-ref ref="CONSOLE"/>
          <appender-ref ref="FILE"/>
       </root>
    
       
    
    </log4j:configuration>

  2. #2
    lovelesh is offline Senior Member
    Join Date
    Nov 2010
    Location
    Delhi
    Posts
    135
    Blog Entries
    1
    Rep Power
    0

Similar Threads

  1. JMS work in JBOSS 5??
    By kkc85 in forum Enterprise JavaBeans (EJB)
    Replies: 3
    Last Post: 01-20-2010, 09:22 PM
  2. JBoss and JBoss Profiler
    By 82rathi.angara in forum Networking
    Replies: 0
    Last Post: 06-18-2008, 02:47 PM
  3. JBoss server
    By mew in forum Enterprise JavaBeans (EJB)
    Replies: 2
    Last Post: 01-08-2008, 08:22 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •