Changing the Dynamic Agent Proxy Logs Level
To modify the verbosity of the Dynamic Agent Proxy logs, you must update the
log4j2.xml
file. The location of this file varies depending on the agent
used and the agent installation path.
Agent | Description | Example Path |
---|---|---|
Python Agent | The proxy configuration file path depends on the application site-packages directory, where the agent is installed along with its dependencies. |
/<path_to>/site-packages/appdynamics_bindeps/proxy/conf/logging/log4j2.xml
|
Web Server Agent | The proxy configuration file path depends on where the agent binary has been extracted. |
/opt/appdynamics-sdk-native/proxy/conf/logging/log4j2.xml
|
PHP Agent | The proxy configuration file path depends on where the agent binary has been extracted. |
/opt/appdynamics-php-agent-linux_x64/proxy/conf/logging/log4j2.xml
|
Changing the log level or verbosity of the proxy logs is common across all three agents (Python, Web Server, and PHP).
log4j2.xml
file, you change the level
to the
respective value for AsyncLogger
within the Loggers
tags:- info (default)
- error
- warn
- debug
- trace
For example, you can see how the default info level is changed to debug level.
- Default Level: Info
-
<Loggers> <AsyncLogger name="com.singularity" level="info" additivity="false"> <AppenderRef ref="Default"/> <AppenderRef ref="RESTAppender"/> <AppenderRef ref="Console"/> </AsyncLogger> ... ... </Loggers>
- Custom Level: Debug
-
<Loggers> <AsyncLogger name="com.singularity" level="debug" additivity="false"> <AppenderRef ref="Default"/> <AppenderRef ref="RESTAppender"/> <AppenderRef ref="Console"/> </AsyncLogger> ... ... </Loggers>
Make a note of the following when changing the log levels:
- For the Python agent, the
AsyncLogger
sub-tags in the configuration file are listed differently than other agents. - Ensure that you restart the agent after making changes in the log level.
- If the proxy is launched manually, restart the proxy followed by the agent restart.