Skip to end of metadata
Go to start of metadata

Log Files Generated by the Controller

The Controller creates these log files in the <Controller_Installation_Directory>/logs directory:

  • database.log: Contains error log information generated by MySQL.
  • server.log: Contains logs generated by the Controller and Glassfish.
  • startAS.log: Contains output generated by the underlying Glassfish domain for the Controller.

Manage Log Files

The application server is preconfigured to rotate the server.log file regularly, based on settings in the domain configuration file.

For the other log files, database.log and startAS.log, you need to set up log rotation to prevent them from consuming excessive disk space. You also need to set up log rotation for an additional log file, <Controller_Installation_Directory>/db/data/slow.log. This log contains information about slow MySQL queries.

The tool you use to perform the rotation depends on your operating system. On Linux, you can use the mysql-log-rotate script. The script is included with the Controller database installation at <Controller_Installation_Directory>/db/support-files. You need to modify the script for your environment, since it is not set up to rotate the database.log file by default. On other systems, you need to create or install a script that performs log rotation and make sure that it get run regularly, for example, by cron or an equivalent task scheduler.

To change the default location or names of the Controller logs

  1. In a web browser, log in to the Controller's Glassfish administration console, as described in Access the Administration Console.
  2. From the left-side navigation tree, expand Configurations -> server-config and click Logger Settings.
  3. Set the new location for server.log by modifying the Log File value.
    The default value points to the logs directory located at the root of the Controller home directory.

    ${com.sun.aas.instanceRoot}/../../../../logs/server.log

     If you specify a directory that does not exist, it is created when you restart the application server.

  4. Change the database.log location by opening the <Controller_Installation_Directory>/db/db.cnf file.

  5. Set the value of the log-error property to the new location of the database.log file. This directory location must exist before you restart the Controller or you will get start-up errors.

  6. Change the startAS.log location by opening the <Controller_Installation_Directory>/bin/controller.sh file.

  7. Edit the log location specified in the following line to reflect the new location:

    nohup ./asadmin start-domain domain1 > $INSTALL_DIR/logs/startAS.log

     

  8. Open the <Controller_Installation_Directory>/appserver/glassfish/domains/domain1/config/domain.xml file, and change the log location specified in the following:

    • log-root attribute of the domain element.

    • file attribute of the log-service element.

    • tx-log-dir attribute of the transaction-service element.

  9. Copy if desired any existing logs from the default directory (<Controller_Installation_Directory>/logs) to the new location.

  10. Restart the Controller. See Start or Stop the Controller.

  11. Verify that the database.log, server.log, and startAS.log files are being written to the new location and remove the old log files.

Configuring Debug Logging for the Controller

The Controller logs provide information about possible errors in Controller operations. By default, the Controller writes to the log at the INFO level. When debugging your Controller deployment, you may need to increase the logging level to generate additional information.

You can set the logging level by Controller component, which include:

  • Agents
  • Business Transactions (BTS)
  • Events
  • Incidents
  • Information Points (IPS)
  • Metrics
  • Orchestration
  • Rules
  • Snapshots

To change default logging level for Controller components

By default, the Controller generates logs at the INFO level. You can change the level for one or all of the components. This may be needed, for example, when you are debugging your system, and want the Controller to generate more information in the form of logs. On the other hand, you may wish to reduce logging verbosity to minimize the reduce the rate of growth of log files. The following steps describe how to change the default log levels.

  1. In a web browser, log in to the Controller's Glassfish administration console, as described in Access the Administration Console.
  2. From the left-side navigation tree, expand Configurations -> server-config and click Logger Settings.
  3. Click the Log Levels tab.
  4. Modify those components that start with "com.appdynamics". By sorting the list by name, you can quickly access the com.appdynamics components. For each component, modify the log level by choosing a new level from the Log Level menu. For example, to debug the system, we suggest setting the log level to FINE.
  5. Click Save.

Learn More