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

Bug 583131

Summary: Fix Java Client logging
Product: Red Hat Enterprise MRG Reporter: Rajith Attapattu <rattapat+nobody>
Component: qpid-javaAssignee: Jonathan Robie <jonathan.robie>
Status: CLOSED ERRATA QA Contact: Jiri Kolar <jkolar>
Severity: urgent Docs Contact:
Priority: urgent    
Version: 1.2CC: gsim, jkolar, jonathan.robie
Target Milestone: 1.3   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
The Java Client is now shipped with the 'slf4j' API in the qpid-deps.jar Java Archive (JAR) file, and the 'log4j' binding in slf4j-log4j.jar.
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-10-14 16:00:23 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:

Description Rajith Attapattu 2010-04-16 18:48:45 UTC
Description of problem:
The Java Client is using slf4j as a logging façade. We currently ship log4j as the default binding. But it poses several issues,

a) log4j if not configured properly will default to DEBUG - see 493559

b) We are unable to ship a log4j.xml or a log4j.properties file as it will interfere with the end users setup.

c) If we don't ship them, then we risk picking up from some log4j.xml/property file which is isn't configured properly leading to qpid logging at DEBUG mode.

There are several possible solutions for this discussed in the upstream project Qpid.

1. Ship nothing forcing the enduser to configure logging themselves.
2. Ship our own binding which will default to WARN and print a warning message asking the end-user to configure the logging properly.
3. Ship with the binding for jdk logging.

Version-Release number of selected component (if applicable):
Affects all previously released versions

How reproducible:
N/A

Steps to Reproduce:
N/A  

Actual results:
N/A

Expected results:
N/A

Additional info:

Comment 1 Gordon Sim 2010-05-21 10:57:45 UTC
As of qpid-java-0.7.946106 the default logging level is INFO out the box and this is horribly noisy when e.g. running the hello world example.

Comment 2 Rajith Attapattu 2010-06-09 15:56:43 UTC
We now ship the slf4j api in qpid-deps.jar and the log4j binding in slf4j-log4j.jar. Both jars are placed under /usr/share/java/qpid-deps.

The documentation explains,

1. How to use a different binding.
2. How to configure the default binding (log4j) using an example.
3. A warning that if the default binding is used, logging needs to be explicitly configured or else it will default to DEBUG which will degrade performance.

Regards,

Rajith

Comment 3 Jiri Kolar 2010-06-29 08:34:51 UTC
Fixed, Verified
both jars are present,

packages:
qpid-java-client-0.7.946106-3
qpid-java-common-0.7.946106-3


Documentation:
1.present
2.example added
3.warning present

package:
rhm-docs-0.7.946106-2

-=#> VERIFIED

Comment 4 Martin Prpič 2010-10-10 09:22:22 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
The Java Client is now shipped with the 'slf4j' API in 'qpid-deps.jar' and the 'log4j' binding in 'slf4j-log4j.jar'.

Comment 5 Douglas Silas 2010-10-11 14:00:59 UTC
    Technical note updated. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    Diffed Contents:
@@ -1 +1 @@
-The Java Client is now shipped with the 'slf4j' API in 'qpid-deps.jar' and the 'log4j' binding in 'slf4j-log4j.jar'.+The Java Client is now shipped with the 'slf4j' API in the qpid-deps.jar Java Archive (JAR) file, and the 'log4j' binding in slf4j-log4j.jar.

Comment 7 errata-xmlrpc 2010-10-14 16:00:23 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/RHSA-2010-0773.html