| Drupal request logs | drupal-requests.log | ✓ | ✓ | Records all Drupal page loads on your application. |
| Drupal watchdog logs | drupal-watchdog.log | ✓ | ✓ | Records Drupal-related actions on your application. The watchdog log is recorded on your infrastructure if you have enabled the syslog module. |
| Fpm access logs | fpm-access.log | ✓ | ✓ | Records all requests handled by Fpm’s process management in PHP. |
| Fpm error logs | fpm-error.log | ✓ | ✓ | Records infrastructure-level issues with Fpm’s process management in PHP. For application-level PHP issues, see the PHP error log. |
| PHP error logs | php-errors.log | ✓ | ✓ | Records any issues that occur during the PHP processing portion of a page load, including issues caused by an application’s code, configuration, or content. |
| Varnish request logs | 𐄂 | ✓ | Records all requests processed by Varnish, both cached and uncached. Available only to subscriptions with dedicated load balancers that forward logs to an external service. |
| Log type | Log file name | Download | Stream | Description |
|---|---|---|---|---|
| Apache access logs | 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 logs | error.log | ✓ | ✓ | Records any Apache-level issues. The issues reported here are typically caused by general infrastructure issues, including capacity problems, .htaccess problems, and missing files. |
| Balancer logs | 𐄂 | ✓ | Provides information about requests received at the balancer level. | |
| Drupal request logs | drupal-requests.log | ✓ | ✓ | Records all Drupal page loads on your application. |
| Drupal watchdog logs | drupal-watchdog.log | ✓ | ✓ | Records Drupal-related actions on your application. The watchdog log is recorded on your infrastructure if you have enabled the syslog module. |
| MySQL slow query logs | ✓ | Contains a list of MySQL queries that have taken longer than 1 second to complete. Since slow query logs are stored in a root-only MySQL directory on your infrastructure, you can only download them through the Cloud Platform user interface, but cannot access them directly on the infrastructure. For more information, refer to Downloading your slow query log and Tools for parsing a slow query log. | ||
| PHP error logs | php-errors.log | ✓ | ✓ | Records any issues that occur during the PHP processing portion of a page load, including issues caused by an application’s code, configuration, or content. |
| Varnish request logs | 𐄂 | ✓ | Records all requests processed by Varnish, both cached and uncached. Available only to subscriptions with dedicated load balancers that forward logs to an external service. |
The following logs are available through various methods, such as downloading or log forwarding:
| Log type | Log file name | Download | Description |
|---|---|---|---|
| Cloud Hooks logs | cloud-hook.log | ✓ | Records all messages sent to the standard output stream (STDOUT) during Cloud Platform Hook execution. |
| Scheduled Cron Jobs logs | cronjob.log | ✓ | Records all messages sent to the standard output stream (STDOUT) during Cronjob execution. |
The following logs available through various methods, such as streaming, download, or log forwarding:
| Log type | Log file name | Download | Stream | Description |
|---|---|---|---|---|
| Shell logs | bash.log | ✓ | 𐄂 | Records all commands that are executed by the application user. This includes SSH, cron, or user commands when executed in the context of the site. |
To download active log files:
Select Logs > Download.
Click the Download link for the log that you want to download.
After the log file is ready for download, click Download to retrieve it.
The system downloads the log file in the following format:
logfilename-timestamp.tar.gz
You can access or download historical logs by using the following:
You can access or download historical logs by using the following: Acquia CLI, Cloud Platform user interface or Cloud API. You can use SSH, rsync, and SCP to download custom log files written in a persistent directory such as /shared/logs. These logs are not automatically rotated. Therefore, you must periodically prune this directory to ensure that it does not consume bulk of the storage allocated to your subscription. Downloading logs might take up to 30 seconds because of the remote log retention service, which ensures that logs persist when environments auto-scale.
You can access or download historical logs by using the following: SSH, rsync, SCP, Cloud Platform user interface, or other tools. Log files on Cloud Classic environments don’t persist after an infrastructure is relaunched or resized.
The Logs page allows you to select a specific date and time range when attempting to download a log file. Logs are limited to 24 hour increments.
Historical logs are stored in a location on the infrastructure that’s optimized for fast read/write activity. While this works for simultaneously updating several log files, the directory won’t persist after infrastructure is relaunched or resized. Log files do persist after infrastructure is rebooted. A relaunch can happen at any time. For example, in the event of infrastructure failure.
A limited subset of logs generated by custom activities, such as cron jobs leveraging Acquia’s cron-wrapper.sh script, can be found in the /shared/logs directory. This directory is persistent and maps to your file system. Also, it can be used for all custom log files. All the logs listed in the Available log files section are available for download through the Cloud Platform user interface.
A server maintains its own log files. For each server, the log file is located at /var/log/sites/[site].[env]/logs/[servername]/[logname].log. You can find your website name and server names on the Infrastructure page. For example, the Apache error log for the Dev environment of a website named myexample on a server named srv-25 is:
/var/log/sites/myexample.dev/logs/srv-25/error.log
Apart from Cloud Hooks logs and Scheduled Cron Jobs logs, all the logs listed in the Available log files section are available for download through the Cloud Platform user interface.
The infrastructure creates a new log file every day and compresses, archives, and saves old logs by date in the YYYYMMDD format:
access.log-20140527.gzerror.log-20140527.gzdrupal-requests.log-20140527.gzdrupal-watchdog-20140527.gzphp-errors.log-20140527.gzThe system archives log files by file name, and won’t archive files in the logs directory if they don’t have the default names intact like those listed above.
All the logs listed in the Available log files section cannot be accessed through SSH, scp and rsync. However, if you write your custom or cron logs in one of the following directories, you can access such logs through SSH, scp and rsync.
/shared/logs$HOMEYou can access log files on an infrastructure using SSH. For example, to view the Apache access log on the specified infrastructure:
less /var/log/sites/[site].[env]/logs/[SERVER_NAME]/access.logYou can use the following methods to download logs:
To download the logs for any of your Cloud environment using Acquia CLI:
Check the list of log files available for your environment:
acli api:environments:log-list AH_SITE_GROUP.AH_SITE_ENVIRONMENTUsing jq:
acli api:environments:log-list AH_SITE_GROUP.AH_SITE_ENVIRONMENT | jq '.[] | .name'Initiate the process of generating a log file of the required type, for example, apache-access :
acli api:environments:log-create AH_SITE_GROUP.AH_SITE_ENVIRONMENT apache-access --from="2024-01-20T00:00:00+00:00" --to="2024-01-20T23:59:59+00:00"The Log snapshots must cover no more than 24 hours and can only be retrieved up to 30 days in the past. The Log snapshots is based on the time zone that you have set on the Cloud UI. You can check that by going to Account > profile.
To confirm if the Task listed for log file creation has completed successfully, run the following command:
acli api:applications:notification-list AH_SITE_GROUPIf the status of the log creation task is shown is completed, that means the log file is generated, and now you can download it.
Using jq:
acli api:applications:notification-list AH_SITE_GROUP | jq '.[] | select (.label | contains ("Log file created"))'After waiting for couple of minutes or once you have checked in Cloud Platform user interface that the task is completed, download the generated file:
acli api:environments:log-download AH_SITE_GROUP.AH_SITE_ENVIRONMENT | jq apache-accessThe output of above command will give a "url", you need to click on the URL and open it in browser to start the download of log file.
Using jq:
curl $(acli api:environments:log-download AH_SITE_GROUP.AH_SITE_ENVIRONMENT apache-access | jq -r '.url') -o apache-log.gz
You can use the rsync command from your local development environment to download logs:
To list the log files on your web infrastructure, use the rsync command and substitute the correct values for your application, infrastructure, and Cloud Platform SSH key pathname (typically $HOME/.ssh/id_rsa):
rsync -avz -e 'ssh -i /path/private/keyfile' SSH_URL:LOG_PATHThe rsync command 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.logFor each file you want to download, use the rsync command and substitute the correct values for your application, infrastructure, Cloud subscription SSH key, and the file you want to download:
rsync -avz -e 'ssh -i /path/to/private/key/file' SSH_URL:LOG_PATH/FILE_NAME.log LOCAL_PATHFor example:
rsync -avz -e 'ssh -i /Users/mac.user/.ssh/id_rsa' [email protected]:/mnt/gfs/home/example/logs/access.log-20151225.gz/access.log $HOME/tmp/Acquia uses additional logs from the logs mentioned earlier on this page that are not available to subscribers. These logs are inaccessible for several reasons, including the potential for security issues related to shared resources.
Binary logs: Binary log (binlog) files are used to replicate data from the master database to a replica database. All statements that change data, including create, update, and delete statements, add lines to the MySQL binlogs. Queries that only read from the database, without changing the contents, don’t add lines to the binlogs. Staging environments, despite not having redundant databases, also use binlogs to keep feature and performance parity between non-production and production environments. For more information, see Binlogs.
Email logs: Email logs are often a shared infrastructure resource, may have sensitive information, and aren’t available to subscribers.
If this content did not answer your questions, try searching or contacting our support team for further assistance.
| 𐄂 |
| ✓ |
| Provides information about requests received at the balancer level. |
| Drupal request logs | drupal-requests.log | ✓ | ✓ | Records all Drupal page loads on your application. |
| Drupal watchdog logs | drupal-watchdog.log | ✓ | ✓ | Records Drupal-related actions on your application. The watchdog log is recorded on your infrastructure if you have enabled the syslog module. |
| Fpm access logs | fpm-access.log | ✓ | ✓ | Records all requests handled by Fpm’s process management in PHP. |
| Fpm error logs | fpm-error.log | ✓ | ✓ | Records infrastructure-level issues with Fpm’s process management in PHP. For application-level PHP issues, see the PHP error log. |
| PHP error logs | php-errors.log | ✓ | ✓ | Records any issues that occur during the PHP processing portion of a page load, including issues caused by an application’s code, configuration, or content. |
| Varnish request logs | 𐄂 | ✓ | Records all requests processed by Varnish, both cached and uncached. Available only to subscriptions with dedicated load balancers that forward logs to an external service. |
| Log type | Log file name | Download | Stream | Description |
|---|---|---|---|---|
| Apache access logs | 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 logs | error.log | ✓ | ✓ | Records any Apache-level issues. The issues reported here are typically caused by general infrastructure issues, including capacity problems, .htaccess problems, and missing files. |
| Balancer logs | 𐄂 | ✓ | Provides information about requests received at the balancer level. | |
| Drupal request logs | drupal-requests.log | ✓ | ✓ | Records all Drupal page loads on your application. |
| Drupal watchdog logs | drupal-watchdog.log | ✓ | ✓ | Records Drupal-related actions on your application. The watchdog log is recorded on your infrastructure if you have enabled the syslog module. |
| MySQL slow query logs | ✓ | Contains a list of MySQL queries that have taken longer than 1 second to complete. Since slow query logs are stored in a root-only MySQL directory on your infrastructure, you can only download them through the Cloud Platform user interface, but cannot access them directly on the infrastructure. For more information, refer to Downloading your slow query log and Tools for parsing a slow query log. | ||
| PHP error logs | php-errors.log | ✓ | ✓ | Records any issues that occur during the PHP processing portion of a page load, including issues caused by an application’s code, configuration, or content. |
| Varnish request logs | 𐄂 | ✓ | Records all requests processed by Varnish, both cached and uncached. Available only to subscriptions with dedicated load balancers that forward logs to an external service. |
The following logs are available through various methods, such as downloading or log forwarding:
| Log type | Log file name | Download | Description |
|---|---|---|---|
| Cloud Hooks logs | cloud-hook.log | ✓ | Records all messages sent to the standard output stream (STDOUT) during Cloud Platform Hook execution. |
| Scheduled Cron Jobs logs | cronjob.log | ✓ | Records all messages sent to the standard output stream (STDOUT) during Cronjob execution. |
The following logs available through various methods, such as streaming, download, or log forwarding:
| Log type | Log file name | Download | Stream | Description |
|---|---|---|---|---|
| Shell logs | bash.log | ✓ | 𐄂 | Records all commands that are executed by the application user. This includes SSH, cron, or user commands when executed in the context of the site. |
To download active log files:
Select Logs > Download.
Click the Download link for the log that you want to download.
After the log file is ready for download, click Download to retrieve it.
The system downloads the log file in the following format:
logfilename-timestamp.tar.gz
You can access or download historical logs by using the following:
You can access or download historical logs by using the following: Acquia CLI, Cloud Platform user interface or Cloud API. You can use SSH, rsync, and SCP to download custom log files written in a persistent directory such as /shared/logs. These logs are not automatically rotated. Therefore, you must periodically prune this directory to ensure that it does not consume bulk of the storage allocated to your subscription. Downloading logs might take up to 30 seconds because of the remote log retention service, which ensures that logs persist when environments auto-scale.
You can access or download historical logs by using the following: SSH, rsync, SCP, Cloud Platform user interface, or other tools. Log files on Cloud Classic environments don’t persist after an infrastructure is relaunched or resized.
The Logs page allows you to select a specific date and time range when attempting to download a log file. Logs are limited to 24 hour increments.
Historical logs are stored in a location on the infrastructure that’s optimized for fast read/write activity. While this works for simultaneously updating several log files, the directory won’t persist after infrastructure is relaunched or resized. Log files do persist after infrastructure is rebooted. A relaunch can happen at any time. For example, in the event of infrastructure failure.
A limited subset of logs generated by custom activities, such as cron jobs leveraging Acquia’s cron-wrapper.sh script, can be found in the /shared/logs directory. This directory is persistent and maps to your file system. Also, it can be used for all custom log files. All the logs listed in the Available log files section are available for download through the Cloud Platform user interface.
A server maintains its own log files. For each server, the log file is located at /var/log/sites/[site].[env]/logs/[servername]/[logname].log. You can find your website name and server names on the Infrastructure page. For example, the Apache error log for the Dev environment of a website named myexample on a server named srv-25 is:
/var/log/sites/myexample.dev/logs/srv-25/error.log
Apart from Cloud Hooks logs and Scheduled Cron Jobs logs, all the logs listed in the Available log files section are available for download through the Cloud Platform user interface.
The infrastructure creates a new log file every day and compresses, archives, and saves old logs by date in the YYYYMMDD format:
access.log-20140527.gzerror.log-20140527.gzdrupal-requests.log-20140527.gzdrupal-watchdog-20140527.gzphp-errors.log-20140527.gzThe system archives log files by file name, and won’t archive files in the logs directory if they don’t have the default names intact like those listed above.
All the logs listed in the Available log files section cannot be accessed through SSH, scp and rsync. However, if you write your custom or cron logs in one of the following directories, you can access such logs through SSH, scp and rsync.
/shared/logs$HOMEYou can access log files on an infrastructure using SSH. For example, to view the Apache access log on the specified infrastructure:
less /var/log/sites/[site].[env]/logs/[SERVER_NAME]/access.logYou can use the following methods to download logs:
To download the logs for any of your Cloud environment using Acquia CLI:
Check the list of log files available for your environment:
acli api:environments:log-list AH_SITE_GROUP.AH_SITE_ENVIRONMENTUsing jq:
acli api:environments:log-list AH_SITE_GROUP.AH_SITE_ENVIRONMENT | jq '.[] | .name'Initiate the process of generating a log file of the required type, for example, apache-access :
acli api:environments:log-create AH_SITE_GROUP.AH_SITE_ENVIRONMENT apache-access --from="2024-01-20T00:00:00+00:00" --to="2024-01-20T23:59:59+00:00"The Log snapshots must cover no more than 24 hours and can only be retrieved up to 30 days in the past. The Log snapshots is based on the time zone that you have set on the Cloud UI. You can check that by going to Account > profile.
To confirm if the Task listed for log file creation has completed successfully, run the following command:
acli api:applications:notification-list AH_SITE_GROUPIf the status of the log creation task is shown is completed, that means the log file is generated, and now you can download it.
Using jq:
acli api:applications:notification-list AH_SITE_GROUP | jq '.[] | select (.label | contains ("Log file created"))'After waiting for couple of minutes or once you have checked in Cloud Platform user interface that the task is completed, download the generated file:
acli api:environments:log-download AH_SITE_GROUP.AH_SITE_ENVIRONMENT | jq apache-accessThe output of above command will give a "url", you need to click on the URL and open it in browser to start the download of log file.
Using jq:
curl $(acli api:environments:log-download AH_SITE_GROUP.AH_SITE_ENVIRONMENT apache-access | jq -r '.url') -o apache-log.gz
You can use the rsync command from your local development environment to download logs:
To list the log files on your web infrastructure, use the rsync command and substitute the correct values for your application, infrastructure, and Cloud Platform SSH key pathname (typically $HOME/.ssh/id_rsa):
rsync -avz -e 'ssh -i /path/private/keyfile' SSH_URL:LOG_PATHThe rsync command 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.logFor each file you want to download, use the rsync command and substitute the correct values for your application, infrastructure, Cloud subscription SSH key, and the file you want to download:
rsync -avz -e 'ssh -i /path/to/private/key/file' SSH_URL:LOG_PATH/FILE_NAME.log LOCAL_PATHFor example:
rsync -avz -e 'ssh -i /Users/mac.user/.ssh/id_rsa' [email protected]:/mnt/gfs/home/example/logs/access.log-20151225.gz/access.log $HOME/tmp/Acquia uses additional logs from the logs mentioned earlier on this page that are not available to subscribers. These logs are inaccessible for several reasons, including the potential for security issues related to shared resources.
Binary logs: Binary log (binlog) files are used to replicate data from the master database to a replica database. All statements that change data, including create, update, and delete statements, add lines to the MySQL binlogs. Queries that only read from the database, without changing the contents, don’t add lines to the binlogs. Staging environments, despite not having redundant databases, also use binlogs to keep feature and performance parity between non-production and production environments. For more information, see Binlogs.
Email logs: Email logs are often a shared infrastructure resource, may have sensitive information, and aren’t available to subscribers.
If this content did not answer your questions, try searching or contacting our support team for further assistance.