Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 493559

Summary: Default logging level should be WARN not DEBUG
Product: Red Hat Enterprise MRG Reporter: Gordon Sim <gsim>
Component: qpid-javaAssignee: Rajith Attapattu <rattapat+nobody>
Status: CLOSED ERRATA QA Contact: Jiri Kolar <jkolar>
Severity: low Docs Contact:
Priority: high    
Version: 1.0CC: freznice, iboverma, jkolar, lbrindle, tross
Target Milestone: 1.2   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Messaging enhancement The default logging level has been changed from DEBUG to WARN when using the java messaging client, to reduce verbosity.
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-12-03 09:18:09 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 527551    

Description Gordon Sim 2009-04-02 09:08:34 UTC
With /usr/share/java/qpid-client-M4.jar, /usr/share/java/qpid-common-M4.jar and all the jars under /usr/share/java/qpid-deps on my classpath, the default logging level is DEBUG (at least for all qpid code) which is too verbose. Whatever config file is causing this should be changed so that WARN is the default.

Package versions I tested on:

qpid-java-common-0.5.751061-1.el5
qpid-java-client-0.5.751061-1.el5

Comment 1 Rajith Attapattu 2009-04-21 13:45:10 UTC
The loggin in the Java client uses log4j.
 
The way log4j works is as follows. 
It will try to look for log4j.xml within the classpath.
Failing which it will try to look for log4j.properties within the
classpath.

In our qpid-common-xx.jar we have a log4j.properties and the log level
configured as follows.

log4j.logger.org.apache.qpid=${amqj.logging.level}, console

So unless a system property called amqj.logging.level is not configured,
it will default to DEBUG. (log4j unfortunately defualts to DEBUG instead of WARN).

So we have several options here.
1) Provide the following in our documentation.
   1.1 Document the use of amqj.logging.level  (And also add an extra option for the transport level logging)

   1.2 How to specify a custom log4j file. This will be the most likely used option as this allows the customer to control the logging of the whole application (which uses the qpid libraries) using a single log4j file.
  This could be done using -Dlog4j.configuration=<path_to_file>

2) We hardcode the value to WARN.
   This is not going to work as the Java broker logging relies on these log4j.properties file in the common module. And the configurability it will provide is important and should be preserved.


So in conclusion the best is to use option 1. I will add Lana to the bz to track the progress on documentation.

Comment 2 Gordon Sim 2009-04-21 14:15:59 UTC
Simply documenting it is not in my view acceptable. We want to have a sensible log level out of the box for our packages.

Comment 3 Rajith Attapattu 2009-09-22 00:16:52 UTC
A log4j.xml file for the client module was added in rev 817457 on qpid trunk. 

This defaults to WARN as the default log level.
The settings given i the log4j.xml under the client module could be overridden by explicitly specifying a log4.xml file using -Dlog.configuration property

Comment 4 Jiri Kolar 2009-10-16 08:49:36 UTC
validated, file is present, use WARN log level

packages:

# rpm -qa | grep -E '(qpid|openais|rhm)' | sort -u

openais-0.80.6-8.el5
python-qpid-0.5.752581-3.el5
qpidc-0.5.752581-28.el5
qpidc-debuginfo-0.5.752581-28.el5
qpidc-devel-0.5.752581-28.el5
qpidc-rdma-0.5.752581-28.el5
qpidc-ssl-0.5.752581-28.el5
qpidd-0.5.752581-28.el5
qpidd-acl-0.5.752581-28.el5
qpidd-cluster-0.5.752581-28.el5
qpidd-devel-0.5.752581-28.el5
qpid-dotnet-0.4.738274-2.el5
qpidd-rdma-0.5.752581-28.el5
qpidd-ssl-0.5.752581-28.el5
qpidd-xml-0.5.752581-28.el5
qpid-java-client-0.5.751061-9.el5
qpid-java-common-0.5.751061-9.el5
rhm-0.5.3206-14.el5
rhm-docs-0.5.756148-1.el5
rh-tests-distribution-MRG-Messaging-qpid_common-1.5-15

->VERIFIED

Comment 5 Irina Boverman 2009-10-22 17:24:21 UTC
Release note added. If any revisions are required, please set the 
"requires_release_notes" flag to "?" and edit the "Release Notes" field accordingly.
All revisions will be proofread by the Engineering Content Services team.

New Contents:
Changed default logging level from DEBUG to WARN when using java messaging client (493559)

Comment 6 Lana Brindley 2009-11-26 23:46:34 UTC
Release note updated. If any revisions are required, please set the 
"requires_release_notes"  flag to "?" and edit the "Release Notes" field accordingly.
All revisions will be proofread by the Engineering Content Services team.

Diffed Contents:
@@ -1 +1,3 @@
-Changed default logging level from DEBUG to WARN when using java messaging client (493559)+Messaging enhancement
+
+The default logging level has been changed from DEBUG to WARN when using the java messaging client, to reduce verbosity.

Comment 8 errata-xmlrpc 2009-12-03 09:18:09 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHEA-2009-1633.html