# Drupal Database Log to Syslog — Liran Tal

How to disable the Drupal Database Log and enable Syslog instead

Canonical: https://lirantal.com/blog/2013-10-23

Drupal Database Log is utilizing the built-in watchdog module but it can end up being quite a resource hog if you’re over utilizing it and having many modules enabled, let alone all the PHP warning and errors that it will log – causing an overkill in performance to your database with a lot of writes.

## How to disable the Drupal Database Log and enable Syslog instead

Disabling the DB Logging module and enabling Syslog in Drupal 6:

```
include_once('includes/install.inc');
// Replacing the DB Log module with the Syslog
module_disable(array('dblog'));
drupal_uninstall_module(array('dblog'));
drupal_install_modules(array('syslog'));
```

This requires further configuration on the Linux side for syslog

1.  edit `/etc/syslog.conf` – because default settings for the Syslog module on Drupal are set to use `local0` then we should set logging from the local0 facility to a dedicated Drupal log file, so we’ll add the following entry:

```
# Drupal watchdog logging
local0.*        /var/log/drupal.log
```

By default, Syslog also logs all facilities info level to `/var/log/messages`. This is both annoying, because it hinders on investigating general system issues in `/var/log/messages`, as well as un-necessary duplication of data since this information is already stored in `/var/log/drupal.log`
To disable this behavior we need to tell Syslog to avoid from logging information from local0 to /var/log/messages then,
2\. locate the `/var/log/messages` entry which should look roughly like this:

```
*.info;mail.none;authpriv.none;cron.none;           /var/log/messages
```

and change it into

```
*.info;local0.none;mail.none;authpriv.none;cron.none;           /var/log/messages
```

where we specify `local0.none` and Syslog knows to disregard messages from `local0` facility

And finally restart syslog for changes to take effect

```
/etc/init.d/syslog restart
```

## More writing

[All writing →](/blog)

*   Sep 5, 2026

    ### [Self-Hosting Hermes Agent with Matrix E2EE on Proxmox](/blog/self-host-hermes-agent-matrix-e2ee-proxmox)

*   Aug 2, 2026

    ### [The Practical Second Brain: Building an LLM-Operated Markdown Knowledge Graph](/blog/practical-second-brain-llm-markdown-knowledge-graph)

*   Aug 1, 2026

    ### [Building a Second Brain with LLMs and AI Agents](/blog/building-second-brain-llms-ai-agents)


* * *

Liran Tal is the author of the book [Node.js Secure Coding: Defending Against Command Injection Vulnerabilities](https://www.nodejs-security.com/)

[Start Building Secure Node.js Applications ↗](https://www.nodejs-security.com/)

 [![](/_astro/nodejs-secure-coding-book-3d-style.DiTWpzFs_Z3c7s1.png)](https://www.nodejs-security.com/)
