You can access your website's logs on Acquia Cloud in several ways:
Acquia Cloud uses one or more servers to deliver your Drupal website. 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 website's servers. You can, however, view all the log entries for an Acquia Cloud environment with streaming in real time either on the Cloud > Logs page or from the command line. For information about how to use the information in logs, see Introduction to troubleshooting with log files.
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 website 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 website.|
|Drupal watchdog log||Records Drupal-related actions on your website. The watchdog log is recorded on your server if you have enabled the
|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 Cloud > 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 a website’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 via the Log Streaming feature and cannot be downloaded from either the Insight website or your servers.|
Downloading active log files from the Cloud > Logs page
You can download the most recent logs for each of your website's servers from the Cloud > Logs page. On the Logs page:
- Select the environment for which you want to download a log.
- Click Download logs.
- Click the Download button 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 website name on the Cloud > Users and Keys page. You can find your server names on the Cloud > Servers page. For example, the Apache error log for the Dev environment of a website named
myexample on a server named
srv-25 would be:
The available logs are named:
|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 website 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 website, 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 website, 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' firstname.lastname@example.org /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 download individual logs. To download an individual server log, use the
scp command and substitute the values for your website, 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 localpath
scp -i /Users/esymbolist/.ssh/id_rsa email@example.com /mnt/gfs/home/example/logs/access.log-20151225.gz/access.log /Documents/logs
Acquia Cloud task logs
The logs described on this page relate to events and actions on your websites and their servers. In addition, Acquia Cloud logs tasks performed on any of your Acquia Cloud environments using the Acquia Cloud UI, the Acquia Cloud API, or Drush. For information about how to view records of these tasks, see Viewing tasks.