6.5.2. Setting log4j Priorities
log4jcategories support priorities for logging levels. This means that different areas of the agent can be configured for different log levels.
RHQ_AGENT_DEBUGenvironment variable if you are setting priorities in the
log4j.xmlfile. The environment variable overrides this
- Open the agent
# vim agentRoot/rhq-agent/conf/log4j.xml
- Reset the
priorityelement for the category. By default, the agent configuration has logging for both incoming and outgoing server-agent communication and for the base
org.rhqclass. Optionally, logging can be enabled for plug-in class loaders and JBoss remoting communication.
<!-- ================ --> <!-- Limit categories --> <!-- ================ --> <!-- RHQ --> <category name="org.rhq"> <priority value="INFO"/> </category> <!-- RHQ outgoing command tracing - set to TRACE to trace commands sent by the agent --> <category name="org.rhq.enterprise.communications.command.client.OutgoingCommandTrace"> <priority value="NONE"/> <appender-ref ref="COMMANDTRACE"/> </category> ...
- Restart the agent to load the new configuration.
log4jfile format is described more in the Apache log4j documentation.