ashish joshi
2013-02-27 13:03:37 UTC
ashish joshi [https://community.jboss.org/people/ashishjoshi106] created the discussion
"Problem in jboss-log4j.xml file"
To view the discussion, visit: https://community.jboss.org/message/799860#799860
--------------------------------------------------------------
my file is below and i want to stop sysout from server logs:
jboss-log4j.xml file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
<log4j:configuration xmlns:log4j=" http://jakarta.apache.org/log4j/ http://jakarta.apache.org/log4j/" debug="false">
  <!-- ================================= -->
  <!-- Preserve messages in a local file -->
  <!-- ================================= -->
  <!-- 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"/>
<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] (Thread) Message\n -->
        <param name="ConversionPattern" value="%d %-5p [%c] (%t) %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>
  <category name="org.apache">
     <priority value="INFO"/>
  </category>
 <!-- Limit the jacorb category to WARN as its INFO is verbose -->
  <category name="jacorb">
     <priority value="WARN"/>
  </category>
  <!-- Set the logging level of the JSF implementation that uses
     | java.util.logging. The jdk logging levels can be controlled
     | through the org.jboss.logging.log4j.JDKLevel class that
     | in addition to the standard log4j levels it adds support for
     | SEVERE, WARNING, CONFIG, FINE, FINER, FINEST
  -->
  <category name="javax.enterprise.resource.webcontainer.jsf">
    <priority value="INFO" class="org.jboss.logging.log4j.JDKLevel"/><!--MODIFIED-->
  </category>
  <!-- Limit the org.jgroups category to WARN as its INFO is verbose -->
  <category name="org.jgroups">
     <priority value="WARN"/>
  </category>
<!-- change two -->
<category name="org.hibernate">
    <priority value="ERROR"/>
  </category>
  <!-- Limit the org.quartz category to INFO as its DEBUG is verbose -->
  <category name="org.quartz">
     <priority value="INFO"/>
  </category>
<category name="com.sun">
     <priority value="INFO"/>
  </category>
<!--<category name="com.emitra">
     <priority value="ERROR"/>
        </category>-->
  <!-- Limit the sun category to INFO as its FINE is verbose -->
  <category name="sun">
     <priority value="INFO"/>
  </category>
  <!-- Limit the javax.xml.bind category to INFO as its FINE is verbose -->
  <category name="javax.xml.bind">
     <priority value="INFO"/>
  </category>
  <!-- Limit the springframework category to WARN-->
  <category name="org.springframework">
    <priority value="WARN"/>
  </category>
  <!-- Limit JBoss categories
  <category name="org.jboss">
     <priority value="INFO"/>
  </category>
  -->
  <!-- Limit the JSR77 categories -->
  <category name="org.jboss.management">
     <priority value="INFO"/>
  </category>
 <!-- Limit the verbose facelets compiler -->
  <category name="facelets.compiler">
     <priority value="WARN"/>
  </category>
  <!-- Limit the verbose ajax4jsf cache initialization -->
  <category name="org.ajax4jsf.cache">
     <priority value="WARN"/>
  </category>
  <!-- Limit the verbose embedded jopr categories -->
  <category name="org.rhq">
     <priority value="WARN"/>
  </category>
<category name="org.jboss.seam">
     <priority value="WARN"/>
  </category>
 <!-- Limit the verbose MC4J EMS (lib used by admin-console) categories -->
  <category name="org.mc4j.ems">
     <priority value="WARN"/>
  </category> -->
  <!-- Limit the org.jboss.serial (jboss-serialization) to INFO as its DEBUG is verbose -->
  <category name="org.jboss.serial">
     <priority value="INFO"/>
  </category>
  <!-- ======================= -->
  <!-- Setup the Root category -->
  <!-- ======================= -->
  <root>
     <!--
        Set the root logger priority via a system property. Note this is parsed by log4j,
        so the full JBoss system property format is not supported; e.g.
        setting a default via ${jboss.server.log.threshold:WARN} will not work.
      -->
     <priority value="${jboss.server.log.threshold}"/>
     <appender-ref ref="FILE"/>
  </root>
</log4j:configuration>
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/799860#799860]
Start a new discussion in Beginner's Corner at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2075]
"Problem in jboss-log4j.xml file"
To view the discussion, visit: https://community.jboss.org/message/799860#799860
--------------------------------------------------------------
my file is below and i want to stop sysout from server logs:
jboss-log4j.xml file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
<log4j:configuration xmlns:log4j=" http://jakarta.apache.org/log4j/ http://jakarta.apache.org/log4j/" debug="false">
  <!-- ================================= -->
  <!-- Preserve messages in a local file -->
  <!-- ================================= -->
  <!-- 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"/>
<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] (Thread) Message\n -->
        <param name="ConversionPattern" value="%d %-5p [%c] (%t) %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>
  <category name="org.apache">
     <priority value="INFO"/>
  </category>
 <!-- Limit the jacorb category to WARN as its INFO is verbose -->
  <category name="jacorb">
     <priority value="WARN"/>
  </category>
  <!-- Set the logging level of the JSF implementation that uses
     | java.util.logging. The jdk logging levels can be controlled
     | through the org.jboss.logging.log4j.JDKLevel class that
     | in addition to the standard log4j levels it adds support for
     | SEVERE, WARNING, CONFIG, FINE, FINER, FINEST
  -->
  <category name="javax.enterprise.resource.webcontainer.jsf">
    <priority value="INFO" class="org.jboss.logging.log4j.JDKLevel"/><!--MODIFIED-->
  </category>
  <!-- Limit the org.jgroups category to WARN as its INFO is verbose -->
  <category name="org.jgroups">
     <priority value="WARN"/>
  </category>
<!-- change two -->
<category name="org.hibernate">
    <priority value="ERROR"/>
  </category>
  <!-- Limit the org.quartz category to INFO as its DEBUG is verbose -->
  <category name="org.quartz">
     <priority value="INFO"/>
  </category>
<category name="com.sun">
     <priority value="INFO"/>
  </category>
<!--<category name="com.emitra">
     <priority value="ERROR"/>
        </category>-->
  <!-- Limit the sun category to INFO as its FINE is verbose -->
  <category name="sun">
     <priority value="INFO"/>
  </category>
  <!-- Limit the javax.xml.bind category to INFO as its FINE is verbose -->
  <category name="javax.xml.bind">
     <priority value="INFO"/>
  </category>
  <!-- Limit the springframework category to WARN-->
  <category name="org.springframework">
    <priority value="WARN"/>
  </category>
  <!-- Limit JBoss categories
  <category name="org.jboss">
     <priority value="INFO"/>
  </category>
  -->
  <!-- Limit the JSR77 categories -->
  <category name="org.jboss.management">
     <priority value="INFO"/>
  </category>
 <!-- Limit the verbose facelets compiler -->
  <category name="facelets.compiler">
     <priority value="WARN"/>
  </category>
  <!-- Limit the verbose ajax4jsf cache initialization -->
  <category name="org.ajax4jsf.cache">
     <priority value="WARN"/>
  </category>
  <!-- Limit the verbose embedded jopr categories -->
  <category name="org.rhq">
     <priority value="WARN"/>
  </category>
<category name="org.jboss.seam">
     <priority value="WARN"/>
  </category>
 <!-- Limit the verbose MC4J EMS (lib used by admin-console) categories -->
  <category name="org.mc4j.ems">
     <priority value="WARN"/>
  </category> -->
  <!-- Limit the org.jboss.serial (jboss-serialization) to INFO as its DEBUG is verbose -->
  <category name="org.jboss.serial">
     <priority value="INFO"/>
  </category>
  <!-- ======================= -->
  <!-- Setup the Root category -->
  <!-- ======================= -->
  <root>
     <!--
        Set the root logger priority via a system property. Note this is parsed by log4j,
        so the full JBoss system property format is not supported; e.g.
        setting a default via ${jboss.server.log.threshold:WARN} will not work.
      -->
     <priority value="${jboss.server.log.threshold}"/>
     <appender-ref ref="FILE"/>
  </root>
</log4j:configuration>
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/799860#799860]
Start a new discussion in Beginner's Corner at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2075]