cevlogger
Introduction
Custom Event Logger is a simple Drupal module that lets you store custom log messages in your own database table without enabling core logging. It’s ideal for tracking errors and events from your custom code in production safely.
Features
Custom Event Logger provides a developer-controlled logging system separate from Drupal core logging.
Core functionality:
Log messages programmatically using a dedicated service
Store logs in a separate database table (cevlogger_logs)
View logs via a built-in admin UI
Key features:
Lightweight and production-safe (no dependency on dblog)
Fully explicit logging — only logs what you send
Categorization by:
Module name
Log type (error, warning, info, etc.)
Paginated admin interface for log review
Clean service-based architecture (cevlogger.logger)
When and why to use this module:
When dblog is disabled in production environments
When you need targeted logging instead of system-wide logs
When debugging API integrations or external services
When tracking business-critical workflows
Use cases:
Logging failed API responses (e.g., 500/503 errors)
Monitoring third-party service integrations
Capturing custom validation or processing errors
Debugging production-only issues without verbose logging
Post-Installation
After enabling the module:
Run database updates:
drush updb -y
This creates the cevlogger_logs table.
No configuration page is required.
Start logging immediately using the service:
Via dependency injection (recommended)
Or via \Drupal::service() in hooks
View logs at:
/admin/reports/cevlogger
Important notes:
This module does not automatically log anything
You must explicitly call the logger service in your code
No UI configuration is needed — it is developer-driven
Additional Requirements
Drupal 10 or Drupal 11
No external libraries or APIs required
No dependency on Drupal core logging modules (dblog, syslog)
Recommended modules/libraries
While not required, the following modules may complement usage:
Database Logging (dblog) – for full system logs alongside custom logs
Syslog – for centralized server-level logging
Custom monitoring tools (e.g., external log aggregators)
Similar projects
Database Logging (dblog)
Logs all watchdog events automatically
Can introduce overhead in production
Less control over what gets logged
Syslog
Sends logs to server-level logging systems
Requires server configuration
Not suitable for quick in-app inspection
What makes Custom Event Logger different:
Fully opt-in logging model
Zero noise — only logs what you explicitly send
Designed for custom application-level events, not system-wide logging
Simple, developer-first API
Supporting this Module
If you find this module useful, consider supporting its development by:
Reporting issues
Contributing patches
Sharing feedback with the maintainer
Community Documentation
Additional resources can include:
Code examples and usage snippets (README)
Drush-based testing examples
Demo environments (e.g., DrupalPod)
Additional Notes
This module is not a replacement for Drupal core logging
Best suited for targeted, business-specific logging needs
Keeps production environments clean while still enabling visibility into critical events