MU Syslog Watcher Banner
MU Syslog Watcher Filter UI
MU Syslog Watcher Settings UI

This project is not covered by Drupal’s security advisory policy.

View and filter site log files directly in the Drupal admin area without database logging or server SSH access. Designed for fast, production-safe troubleshooting on any Drupal site.

Features

Enhanced Syslog Watcher (part of the MU module suite) lets site administrators and developers inspect log files written by Drupal core's Syslog module right from Reports → Recent log messages from syslog (/admin/reports/syslog-watcher).

  • Automatic Log Type Dropdown: Automatically discovers log channels (such as php, system, user, cron, and custom module channels) and stores them in local site state for instant dropdown filtering.
  • Bounded File-Level Filtering: When a log type or source filter is active, the module scans up to the newest 10,000 lines sequentially so matching entries are found across pages without loading the entire file into memory. Unfiltered browsing reads only the current page window (5–50 lines).
  • Single-Line Formatting: Collapses multi-line errors and stack traces onto one line per event so log parsing stays reliable.
  • Local & Container Friendly: Includes an optional Save a copy of log messages to the log file setting for local or container environments that do not run OS rsyslog, with automatic fallback to private://logs/drupal.log.
  • Automatic Log Cleanup: Optional cron-based retention (by age in days and/or max file size in bytes) when the hosting server does not already rotate log files.
  • Optional Store & Order Log Stream: Supports viewing and teeing Drupal Commerce (commerce_*) log activity separately.

When to use it: Use this module on production or staging sites where core's Database Logging (dblog) is disabled for performance, or when developers and site builders need quick access to syslog entries without SSH access.

Post-Installation

  1. Enable the core Syslog module and Enhanced Syslog Watcher (drush en syslog mu_syslog_watcher -y).
  2. Go to Configuration → Development → Logging and errors (/admin/config/development/logging) and review:
    • Syslog file path: Defaults to private://logs/drupal.log. Set this to your server's rsyslog path (e.g., /var/log/drupal/drupal.log) in production, ensuring the web server user has read permission.
    • Log field separator: Must match the separator character in your Syslog format (defaults to |).
    • Save a copy of log messages to the log file: Enable on local/development sites without rsyslog; leave off in production.
    • Automatic log cleanup: Optionally enable cron cleanup if your server does not use logrotate.
  3. Open Reports → Recent log messages from syslog (/admin/reports/syslog-watcher) to browse, filter, and inspect individual log entries.

Additional Requirements

  • Drupal 11 or 12
  • Drupal core Syslog module (drupal:syslog)
  • A log file path readable by the web server user (and writable if using local file saving or automatic log cleanup)
  • Events Log Track (events_log_track + event_log_track_syslog) — track authentication and entity create/update/delete events into syslog with database logging disabled.

Similar projects

  • Syslog Watcher — provides basic viewing of syslog files. Enhanced Syslog Watcher extends that concept with automatic log-type discovery cached in local state, bounded file-level filtering across up to 10,000 recent lines, single-line syslog formatting, optional local/container file writing, optional Commerce log stream separation, and cron-based log retention cleanup.

Supporting this Module

Contributions, bug reports, and feature requests are welcome in the issue queue.

Community Documentation

See the included README.md for quick setup, local container tips, and running the PHPUnit test suite.

Project information

  • caution Minimally maintained
    Maintainers monitor issues, but fast responses are not guaranteed.
  • Project categories: Administration tools
  • Created by lethalkale on , updated
  • shield alertThis project is not covered by the security advisory policy.
    Use at your own risk! It may have publicly disclosed vulnerabilities.

Releases