Discussion:
[jboss-user] [Beginner's Corner] - Problem in jboss-log4j.xml file
ashish joshi
2013-02-27 13:03:37 UTC
Permalink
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]
Wolf-Dieter Fink
2013-02-27 17:30:12 UTC
Permalink
Wolf-Dieter Fink [https://community.jboss.org/people/wdfink] created the discussion

"Re: Problem in jboss-log4j.xml file"

To view the discussion, visit: https://community.jboss.org/message/799938#799938

--------------------------------------------------------------
What you mean by "sysout from server logs"?

If you mean the output on the console it is correct to remove the CONSOLE appender.
If you have more questions please post the JBoss version you use.
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/799938#799938]

Start a new discussion in Beginner's Corner at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2075]
ashish joshi
2013-02-28 11:14:52 UTC
Permalink
ashish joshi [https://community.jboss.org/people/ashishjoshi106] created the discussion

"Re: Problem in jboss-log4j.xml file"

To view the discussion, visit: https://community.jboss.org/message/800041#800041

--------------------------------------------------------------
I am using jboss-eap-5.1 version and i don't want these logs see below:


[STDOUT] (ajp-127.0.0.1-8009-179) availDistrictCode20
2013-02-28 16:43:28,860 INFO  *[STDOUT]* (ajp-127.0.0.1-8009-179) dcCode20
2013-02-28 16:43:28,862 INFO  *[STDOUT]* (ajp-127.0.0.1-8009-129) departmentList :: 26
2013-02-28 16:43:28,862 INFO  [STDOUT] (ajp-127.0.0.1-8009-179) ---availDistrictCode-----Pali
2013-02-28 16:43:28,881 INFO  [STDOUT] (ajp-127.0.0.1-8009-179) in AvailServiceManager:::null
2013-02-28 16:43:28,889 INFO  [STDOUT] (ajp-127.0.0.1-8009-179) in AvailServiceManager:::null
2013-02-28 16:43:28,896 INFO  [STDOUT] (ajp-127.0.0.1-8009-179) in AvailServiceManager:::null

I want to remove STDOUT from logs.
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/800041#800041]

Start a new discussion in Beginner's Corner at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2075]
Peter Johnson
2013-02-28 14:51:48 UTC
Permalink
Peter Johnson [https://community.jboss.org/people/peterj] created the discussion

"Re: Problem in jboss-log4j.xml file"

To view the discussion, visit: https://community.jboss.org/message/800088#800088

--------------------------------------------------------------
See if this helps:
https://community.jboss.org/thread/174448#635460 https://community.jboss.org/thread/174448#635460
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/800088#800088]

Start a new discussion in Beginner's Corner at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2075]
ashish joshi
2013-03-04 12:05:41 UTC
Permalink
ashish joshi [https://community.jboss.org/people/ashishjoshi106] created the discussion

"Re: Problem in jboss-log4j.xml file"

To view the discussion, visit: https://community.jboss.org/message/800575#800575

--------------------------------------------------------------
I am not using Console appender.............
i want to disable STDOUT from JBOSS ...........
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/800575#800575]

Start a new discussion in Beginner's Corner at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2075]
Peter Johnson
2013-03-04 15:32:42 UTC
Permalink
Peter Johnson [https://community.jboss.org/people/peterj] created the discussion

"Re: Problem in jboss-log4j.xml file"

To view the discussion, visit: https://community.jboss.org/message/800632#800632

--------------------------------------------------------------
Did you look at comment #12 from Jason Yao? His post tells you how to enable STDOUT messages in the log, doing the opposite show disable STDOUT messages in the log.
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/800632#800632]

Start a new discussion in Beginner's Corner at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2075]
ashish joshi
2013-03-13 12:56:12 UTC
Permalink
ashish joshi [https://community.jboss.org/people/ashishjoshi106] created the discussion

"Re: Problem in jboss-log4j.xml file"

To view the discussion, visit: https://community.jboss.org/message/802349#802349

--------------------------------------------------------------
Please give me proper answer if i will do that then only name STDOUT remove not STDOUT messages remove. understand my problem.
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/802349#802349]

Start a new discussion in Beginner's Corner at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2075]
Loading...