book
Article ID: KB0086500
calendar_today
Updated On:
Description
Resolution:
Description:
============
From version 4.x to 5.x, Hawk uses a new log4j logger. "-log_level" in hawkagent.cfg and hawkevent.cfg does not work if you want to capture only WARN level. Follow the instructions below to change the log mode.
Environment:
========
Hawk 5.0
Resolution:
=======
Here are the steps to run Hawk 5.0 Agent in different log modes using the new log4j logger:
1). INFO: This is the default log mode for the Hawk agent and requires no change in configuration.[ -log_level in hawkagent.cfg is set to 7].
2). DEBUG: To run the Agent in debug mode, set the parameter -log_level in hawkagent.cfg to 8.
3). WARN: To run the Agent in WARN log mode:
3a). No change is required in hawkagent.cfg -log_leve. It should be set to 7. Setting it to 6 will have no impact.
3b). Confirm that the property is set in tibhawkagent.tra .
java.extenthe ded.properties=-Dlog4j.configuration=%HAWK_CONFIG_HOME%/bin/log4j_agent.properties
3c). In log4j_agent.properties, change the following statement:
log4j.rootLogger=INFO, stdout, RFileApp
to
log4j.rootLogger=WARN, RFileApp
4). ERROR: For error mode, follow the steps similar to WARN mode and in log4j_agent.properties. Configure the ERROR mode instead of WARN.
For Event service:
1). INFO: This is default log mode for Hawk Event service and requires not change in configuration.[ -log_level in hawkevent.cfg is set to 7].
2. DEBUG: To run Event Service in debug mode, just set the parameter -log_level in hawkevent.cfg to 8.
3). WARN: To run Event Service in WARN log mode:
3a). No change required in hawkevent.cfg -log_level should remain to 7, setting to 6 will have no impact.
3b). Copy log4j_agent.properties to log4j_event.properties
3c). Add thefollowing property in tibhawkevent.tra
java.extended.properties=-Dlog4j.configuration=%HAWK_CONFIG_HOME%/bin/log4j_event.properties
3d). In the log4j_ event.properties, change the following statement from
log4j.rootLogger=INFO, stdout, RFileApp
to
log4j.rootLogger=WARN, RFileApp
4). ERROR: For error mode, follow the steps similar to WARN mode and in in log4j_ event.properties. Configure ERROR mode instead of WARN.
Issue/Introduction
How to enable different log modes using the new log4j logger in Hawk 5.x?