no_404_log
No 404 Log is a module for Drupal 10 and 11 that prevents “Page not found” (404) events from being written to the system log. It helps keep logs clean by suppressing all 404 entries or filtering only specific paths using regular expressions. This module is designed for users who want clearer, noise‑free logs without modifying how Drupal displays or handles 404 pages.
Features
• Suppresses all 404 log events across all PSR‑3 logging channels
• Supports regex-based filtering to ignore only specific 404 paths
• Does not affect how 404 pages render for end users
• Simple configuration interface under /admin/config/development/no_404_log
• Optional override through settings.php for global suppression
• Ideal for high‑traffic sites, security-sensitive environments, and installations integrating external log collectors (e.g., Splunk, Datadog, Graylog)
Use cases include:
• Preventing log flooding caused by bots or scanners
• Reducing noise in DBLog or Syslog
• Lowering load and storage costs in third‑party log aggregation systems
• Improving signal‑to‑noise ratio when debugging real issues
Post‑Installation
After installing the module:
1. Go to the configuration page:
/admin/config/development/no_404_log
2. Choose between:
• Suppressing all 404 logs
• Suppressing only specific paths using regex patterns (one per line)
3. Optional override (always takes priority):
In settings.php:
$settings['no404log_enabled'] = TRUE;
No content types, blocks, permissions, or text formats are added.
This module affects only logging behavior.
Additional Requirements
This project has **no dependencies beyond Drupal core**.
It uses Drupal’s built‑in PSR‑3 logging services.
Recommended modules/libraries
Not required, but complementary options include:
• Syslog — to offload logs to the operating system
• Monolog — advanced channels and handlers
• Audit Log — improved event tracking