Bug 591762

Summary: Configure SNMP4J to use Log4jLogFactory by default
Product: [Other] RHQ Project Reporter: James Livingston <jlivings>
Component: AlertsAssignee: RHQ Project Maintainer <rhq-maint>
Status: CLOSED NOTABUG QA Contact: Mike Foley <mfoley>
Severity: medium Docs Contact:
Priority: low    
Version: unspecifiedCC: joallen, jshaughn, mazz
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-05-29 18:05: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:

Description James Livingston 2010-05-13 02:57:34 UTC
By default SNMP4J simply throws away it's logs, and it would be good if it sent them to Log4J by default so that they can be enabled just by editing jboss-log4j.xml. Currently you have to edit rhq-server.sh and restart JON to enable it.

To send SNMP4J logs to log4j, you can either add "-Dsnmp4j.LogFactory=org.snmp4j.log.Log4jLogFactory" to the RHQ java opts, or call LogFactory.setLogFactory(new org.snmp4j.log.Log4jLogFactory()) in code.


If this change is made, setting the org.snmp4j category to WARN (or ERROR) by default is probably a good idea.

Comment 1 John Mazzitelli 2011-02-17 17:37:27 UTC
i think as a quick workaround, you can add that system property to rhq-server.properties

Comment 2 Jay Shaughnessy 2014-05-29 18:05:09 UTC
Assuming workaround is sufficient.