Proxy logs are created for app server agents that use the Dynamic Agent Proxy to communicate with the Controller. See Dynamic Language Agent Proxy.
The PHP Agent, Python Agent, and the Web Server Agent generate logs for the Dynamic Agent Proxy. The logs determine why snapshots are not being taken and diagnose communication issues with the Controller.
The proxy logs consist of a top-level file named proxyCore
Year_mon_day_hr_min.#.log
and files named proxy
Year_mon_day_hr_min.#.log
, where # is the log set. See Agent Log Files for information about how the logs are organized into sets that roll over.
Other logs associated with each proxy log include:
- Bytecode Transformer log
- REST log
- Dynamic Services (used internally for debugging) log
Each proxy log has a maximum size of five MB.
Allowing for the possibility of several restarts and all the possible logs that could be generated (Proxy, BytecodeTransformer, REST, and Dynamic Services), the maximum number of logs is 20 files (four log files times five sets). The maximum size is 100 MB per set.
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).
In the 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.
<Loggers>
<AsyncLogger name="com.singularity" level="info" additivity="false">
<AppenderRef ref="Default"/>
<AppenderRef ref="RESTAppender"/>
<AppenderRef ref="Console"/>
</AsyncLogger>
...
...
</Loggers>
<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.