AppDynamics: Enabling verbose debug logs for Agents

Enabling verbose logs for an AppDynamics machine or database agents can be invaluable for troubleshooting connectivity or network issues.

Luckily, this is easily done by editing the conf/logging/log4j.xml file.  By default, only the error level messages are sent to the logs:

<root>
  <priority value="error"/>
  <appender-ref ref="FileAppender"/>
</root>

But you can modify this so that debug level is sent:

<root>
  <priority value="debug"/>
  <appender-ref ref="FileAppender"/>
</root>

For even more interactive troubleshooting, I often test the machine or database agent from the console instead of a service:

> java -jar machineagent.jar
> java -jar db-agent.jar

And so you want the debug levels to go directly to the console, which would require adding a reference to the Console like:

<root>
  <priority value="debug"/>
  <appender-ref ref="ConsoleAppender"/>
  <appender-ref ref="FileAppender"/>
</root>

 

REFERENCES

https://docs.appdynamics.com/display/PRO42/Agent+Log+Files