Acquia Cloud uses one or more servers to deliver your Drupal application. Each server generates its own log entries and stores them in its own log files. Other than the Drupal watchdog log, there's no single log file you can download that contains data from all your application's servers. You can, however, view all the log entries for an Acquia Cloud environment with streaming in real time either on the Applications > [Environment] > Logs page or from the command line. For information about how to use the information in logs, see Introduction to troubleshooting with log files.
You can access your application's logs on Acquia Cloud in several ways:
- Downloading active log files from the Applications > [Environment] > Logs page
- Downloading historical logs
- Streaming log entries in real time
Log file listing
Acquia Cloud makes the following logs available for your use, either by streaming, download, or both:
|Apache access log||Contains a list of requests for your application that have bypassed Varnish. These requests include pages, theme files, and static media files.|
|Apache error log||Records any Apache-level issues. The issues reported here are usually caused by general server issues, including capacity problems,
|Drupal page request log||Records all Drupal page loads on your application.|
|Drupal watchdog log||Records Drupal-related actions on your application. The watchdog log is recorded on your server if you have enabled the
|FPM error log||Records server-level issues with FPM's process management in PHP. For application-level PHP issues, see the PHP error log.|
|MySQL slow query log||Contains a list of MySQL queries that have taken longer than one second to complete. Since slow query logs are stored in a root-only MySQL directory on your servers, you can only download them using the Logs page, and you cannot access them directly on the server. For more information, see Downloading your slow query log and Tools for parsing a slow query log.|
|PHP error log||Records any issues that occur during the PHP processing portion of a page load. Issues reported here are usually caused by an application’s code, configuration, or content.|
|Varnish log||Notes which requests have been served by Varnish cache and which were not. Since most customers use shared load balancers, Varnish logs are only available using the Log Streaming feature and cannot be downloaded from either the Acquia Cloud interface or your servers.|
Downloading active log files from the Logs page
You can download the most recent logs for each of an environment's servers from the Logs page. On the Logs page:
- Select the environment for which you want to download a log.
- Click Logs, and then click Download Logs.
- Click the Download link for the log you want to download.
Downloading historical logs directly from the server
You can access logs using SSH, rsync, scp, or other tools.
Location of log files
Each server maintains its own log files, with the exception of the Drupal watchdog log. For each server, the log file is located at
/var/log/sites/[site].[env]/logs/[servername]/[logname].log. You can find your site name and server names on the Servers page. For example, the Apache error log for the Dev environment of a site named
myexample on a server named
srv-25 would be:
The available logs are named as follows:
|Apache access log||
|Apache error log||
|PHP error log||
|Drupal page request log||
|Drupal watchdog log||
All Drupal watchdog log messages are combined on the server whose name has the lowest number. For example, if your application has servers named
srv-23, the Drupal watchdog log would be found on srv-7.
Acquia Cloud creates a new server log every day and compresses, archives, and saves old logs by date in the following format (YYYYMMDD):
Log files are archived by file name; files in the
logs directory that don't have the default names will not be archived.
Accessing logs using SSH
You can access log files on a server using SSH. For example, to view the Apache access log on the specified server:
Downloading web server logs using the rsync command
You can use the
rsync command from your local machine to download logs:
- To list the log files on your web server, use the
rsynccommand and substitute the correct values for your application, server, and Acquia Cloud SSH key pathname (typically
rsync -avz -e 'ssh -i /path/private/keyfile' [username]@[host name]:[log path]
rsynccommand produces a list like the following example:
receiving file list ... done drwxr-xr-x 4096 2010/01/26 19:34:05 . -rw-r--r-- 83581323 2010/01/27 12:05:53 access.log -rw-r--r-- 214919 2010/01/27 12:04:57 error.log -rw-r----- 995 2010/01/27 04:15:29 php-errors.log
- For each file that you want to download, use the
rsynccommand and substitute the correct values for your application, server, Acquia Cloud SSH key, and the file that you want to download:
rsync -avz -e 'ssh -i /path/to/private/key/file' [site name]@[host name]:↵ [log path]/[file name].log
rsync -avz -e 'ssh -i /Users/esymbolist/.ssh/id_rsa' [email protected] /mnt/gfs/home/example/logs/access.log-20151225.gz/access.log
Downloading an individual server log using the scp command
You can use the
scp command from your local machine to individual logs. To download an individual server log, use the
scp command and substitute the values for your application, server, Acquia Cloud SSH key pathname (typically
~/.ssh/id_rsa), and the file you want to download:
scp -i /path/to/private/key/file [site name]@[host name]:[log path]/[file name].log [local path]
scp -i /Users/esymbolist/.ssh/id_rsa [email protected]:/mnt/gfs/home/example/logs/access.log-20151225.gz/access.log /Documents/logs
Additional (inaccessible) logs
Acquia uses additional logs from the logs previously mentioned on this page that are not available to customers. These logs are inaccessible for several reasons, including the potential for security issues related to shared resources.
- binlogs - Binlog (binary log) files are used to replicate data from the master database to a replica database. All statements that modify data (such as
deletestatements) add lines to the MySQL binlogs. Queries that only read from the database, without changing the contents, do not add a line to the binlogs. Staging environments (which do not have redundant databases) also use binlogs, which helps keep feature and performance parity between non-production and production environments.
- Email logs - Email logs are often a shared server resource and may contain sensitive information. Because of this, they are not generally available to customers.