Introduction

Use logs on Pantheon to help find, debug, and isolate potential problems.

Contributors: Whitney Meredith.

Discuss in our Forum Discuss in Slack

Log files track and record your site's activity to help you find, debug, and isolate current or potential problems on your site. Each environment (Multidev, Dev, Test, and Live) has individual log files, which can be obtained via SFTP. Application-level logs can be accessed directly through Drupal. You can use New Relic® Performance Monitoring in conjunction with logs to help diagnose and fix errors and performance bottlenecks.

The server timezone and log timestamps are in UTC (Coordinated Universal Time).

 Note

Log files are destroyed during appserver migration (a standard part of regular platform maintenance). Log deletion occurs because the log files are appserver-specific. Consider automating the collection of logs regularly to maintain historical log data.

Fastly on Pantheon provides additional features if you are looking for log or media storage integration solutions.

Available Logs

LogRetention PolicyComments
error.logA legacy file that usually advises about an nginx upgrade or modifying server modules.
newrelic.logNew Relic log; check if an environment is not logging.
nginx-access.logUp to 60 days of logsWeb server access log. Do not consider canonical, as this will be wiped if the application container is reset or rebuilt. See Parsing nginx Access Logs with GoAccess.
nginx-error.log1MB of log dataWeb server error log.
php-error.log 1MB of log dataPHP fatal error log; will not contain stack overflows. Fatal errors from this log are also shown in the Dashboard.
php-fpm-error.log1MB of log dataPHP-FPM generated collection of stack traces of slow executions, similar to MySQL's slow query log. See PHP Slow Log
mysqld-slow-query.log10MB of log dataLog of MySQL queries that took more than 120 seconds to execute. Located in the database's logs/ directory.
mysqld.log1MB of log dataLog of established MySQL client connections and statements received from clients. Also Located in the database's logs/ directory.
mysql-bin.0001MySQL binary logs. Located in the database's data/ directory.

/logs Directory

Rotated log files are archived within the /logs directory on application containers and database servers. The directory might contain sub-directories for services like Nginx and PHP, or it may log files directly in /logs For example:

  • Subdirectories: /logs/nginx/nginx-access.log-20160617.gz or /logs/php/php-error.log-20160617.gz

  • Directly within the /logs directory: /logs/mysqld-slow-query.log-20160606

More Resources