Cloud Platform uses multiple layers of infrastructure to support your Drupal application. Each layer generates its own log entries and stores them in its own log files.
Available log files
Logs in Cloud Classic and Cloud Next
Cloud Platform makes the following logs available for your use through various methods, such as streaming, download, or log forwarding:
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. |
Fpm access logs | fpm-access.log | ✓ | ✓ (for Cloud Next) 𐄂 (for Cloud Classic) | Records all requests handled by Fpm’s process management in PHP. |
Fpm error logs | fpm-error.log | ✓ | ✓ (for Cloud Next) 𐄂 (for Cloud Classic) | Records infrastructure-level issues with Fpm’s process management in PHP. For application-level PHP issues, see the PHP error log. |
MySQL slow query logs | ✓ | 𐄂 (for Cloud Next) ✓ (for Cloud Classic) | 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, see 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. |
Logs only in Cloud Next
Cloud Next environments make the following logs available for your use 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. |
Logs only in Cloud Classic
Cloud Classic environments make the following logs available for your use 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. |
Downloading active log files
To download active log files:
- Sign in to the Cloud Platform user interface as a user with the download logs permission for the subscription and environment you want.
- Select the application and environment for which you want to download a log.
Select Logs > Download.
Click the Download link for the log that you want to download.
- If the log file is available for immediate download, the system begins downloading the file.
- If the log file must be created on-demand, the system displays a dialog box with the status of the request:
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
Downloading historical logs
You can access or download historical logs by using the following:
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.
Location of log files
Archived logs
On Cloud Classic environments, 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.gz
error.log-20140527.gz
drupal-requests.log-20140527.gz
drupal-watchdog-20140527.gz
php-errors.log-20140527.gz
Cloud Classic 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.
Accessing logs using SSH
Downloading logs
You can use the following methods to download logs: