How do I use the Drupal Watchdog log to troubleshoot?
Note
Although this troubleshooting guide is intended for Acquia Cloud users, the information in this article may be helpful regarding websites hosted on other platforms.
The Drupal watchdog log records Drupal-related actions on your Drupal website. On Acquia Cloud, it contains data from all of your website's servers. You can download the most recent watchdog logs from the Cloud > Logs page. For more information about how to do so, see About Acquia Cloud logging.
If you're using another hosting platform, by default Drupal places the watchdog log at http://[site_URL]/admin/reports/dblog.
If you're experiencing issues with a certain webpage on your website and need only the watchdog log messages for that particular webpage, you can obtain those messages with the following steps:
For example, if you want to debug this URL:
http://www.example.comadd a query string (such as ?x=1234) to the end of the URL:
http://www.example.com/?x=1234Note
For each server, the Apache access log file is located at /var/log/sites/[site].[env]/logs/[servername]/[logname].log.
You can find [site] on the Cloud > Users and Keys page, and [servername] on the Cloud > Servers page.
For example, the Apache access log for the Prod environment of a site named example on a server named srv-25 would be:
/var/log/sites/example.prod/logs/srv-25/access.logSSH command.
/var/log/sites/example.prod/logs/srv-25example.
grep "?x=1234" drupal-watchdog.loggrep command again, like this:
grep "?x=1234" drupal-watchdog.log | grep "something else"If you have a particular request that seems to take an excessive amount of time to complete, you can search for it in the watchdog.log
You can cd into your logs directory and use the UNIX tail command to review the log as it processes, like this:
tail -f drupal-watchdog.logIf you tail the log while loading a page, you should see a line that contains a request_id. After you have the request_id, you can search the log with grep, which will display all of the log files this request_id touched.
grep <requestIDhere> *.logLogs from previous days are gzipped. If you want to search through a gzipped log, you can do that with a command similar to the following:
zgrep <string> <logfile.gz>After you have it, and you know what day you're searching for, you can zgrep through all of the gzipped files for that day, like this:
zgrep <string> *<date-filename>.gzBecause excessive memory consumption can cause serious performance issues, you can also use the watchdog log file to help you determine where memory is being used excessively. For details about the Memory Profiler module and how to use it effectively to do this, see Logging using the Memory Profiler module.
If this content did not answer your questions, try searching or contacting our support team for further assistance.
Wed Oct 22 2025 08:59:29 GMT+0000 (Coordinated Universal Time)