PDFs


This page applies to an earlier version of the AppDynamics App IQ Platform.
See the latest version of the documentation.


On this page:

Related pages:

Your Rating:
Results:
PatheticBadOKGoodOutstanding!
46 rates

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: 

-Dappdynamics.agent.logs.dir 

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:

<logger name="com.singularity" additivity="false">
 <!--  to control the logging level of the agent log files, use the level attribute below. value="all|trace|debug|info|warn|error"-->
<level value="debug"/>
<appender-ref ref="AgentLogger"/>
<appender-ref ref="RESTLogger"/>
</logger>

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: 
  1. Open the following configuration file in the agent home for editing:
    <agent_home>/ver<version_number>/conf/logging/log4j.xml

  2. Add the following section to the configuration file:

    <appender name="SyslogAppender" class="com.singularity.util.org.apache.log4j.net.SyslogAppender">
        <param name="Facility" value="local6"/>
        <param name="FacilityPrinting" value="true"/>
        <param name="SysLogHost" value="localhost"/>
        <layout class="com.singularity.util.org.apache.log4j.PatternLayout">
            <param name="ConversionPattern" value="[%t] %d{DATE} %5p %c - %m%n"/>
        </layout>
    </appender>
  3. Configure the agent to redirect its logs to this appender. Find and replace this section of the file: 

    <logger name="com.singularity" additivity="false">
         <!--  to control the logging level of the agent log files, use the level attribute below. value="all|trace|debug|info|warn|error"-->
         <level value="info"/>
         <appender-ref ref="AgentLogger"/>
         <appender-ref ref="RESTLogger"/> 
    </logger>

    With the following:

    <logger name="com.singularity" additivity="false">
         <!--  to control the logging level of the agent log files, use the level attribute below. value="all|trace|debug|info|warn|error"-->
         <level value="info"/>
         <appender-ref ref="SyslogAppender"/>
         <appender-ref ref="RESTLogger"/>
    </logger>
  4. Save the file and restart the JVM.  
  • No labels