By default, the AppDynamics Java Agent writes log files to the <agent_home>/logs/<node_name> directory. See Agent Log Files for information about how the logs are organized into sets that roll over.
About Log File Sizes
Within a set of agent logs, each log type can have multiple log files. The first log file for a specific log can grow to 20 MB. The four subsequent log files for the log can each grow to five MB. Maximum size for a log is 40 MB.
Each set can have six logs: Java Agent, Byte Code Transformer, REST, Business Transaction, JMX, and Dynamic Service. Therefore, the maximum size for the set of logs is 240 MB.
The agent creates a maximum of five sets of logs, therefore the maximum size for all logs is 1200 MB.
Modifying the Log Directory Location
To specify a different log directory, use the following system property:
Set the Agent Log Level
The default logging level for most log files is INFO. Higher logging levels consume more disk space. You can control the logging level for the Java Agent by changing the value of the "level value" parameter in the log4j.xml file in the versioned logging configuration file directory: <agent_home>/<version_number>/conf/logging. For example, to set the log level to DEBUG:
Log to Syslog
Instead of having the Java Agent write to the default log directory in the agent home directory, you can configure the agent to direct logging output to syslog. The agent supports syslog-based logging through log4j SyslogAppender.
To configure the agent to send logs to syslog:
Open the following configuration file in the agent home for editing:
Add the following section to the configuration file:
Configure the agent to redirect its logs to this appender. Find and replace this section of the file:
With the following:
- Save the file and restart the JVM.