You are on page 1of 1

Database logging: viewing log messages

Last updated February 7, 2014. Created on December 7, 2007.


Edited by batigolix, dankoB, LeeHunter, webchick. Log in to edit this page.

About
The Drupal core module Database logging monitors your system, capturing system events in a log to be reviewed by
an authorized individual at a later time.
Before Drupal 7 this module was called Watchdog.
This is useful for site administrators who want a quick overview of activities on their site. The logs also record the
sequence of events, so it can be useful for debugging site errors.
The log is simply a list of recorded events containing usage data, performance data, errors, warnings and operational
information. Administrators should check the Drupal core report on a regular basis to ensure their site is working
properly.
Database logging is not enabled by default, so it needs to be enabled on the Extend page (http://example.com/admin
/modules).

Viewing log messages


To view the log, navigate to the Recent log messages page (http://example.com/admin/reports/dblog)
1. On the Recent log messages page, click Filter Log Messages
2. Select one or more categories from the Type and Severity columns. Hold down the Ctrl key to select more than
one item.
3. Click Filter
To clear the filters click Filter Log Messages and click Reset.

Viewing log messages when the site is down


To view the log messages when the site is down you need the core syslog module or drush.
The drush command to see log messages is drush wd-show . Check drush help wd-show for uses of the command. A
particular useful way of using wd-show is with the --tail option: drush wd-show --tail .

Configuring the log


1. Navigate to the Logging and Errors configuration page (/admin/config/development/logging)
2. In the Errors and Messages section, specify whether messages will be displayed. In production environments, this
is generally set to None.
3. In the Database Log Entries to Keep field, select the number of log entries to retain in the database. A cron job
must run for this setting to be applied.
Watchdog: monitor your site

1 of 1

You might also like