Drupal is a registered trademark of Dries Buytaert
Protected Pages 3.0.0 Major update available for module protected_pages (3.0.0). Commerce Core 3.3.8 Minor update available for module commerce (3.3.8). Search API HTML Element Filter 1.0.7 Minor update available for module search_api_html_element_filter (1.0.7). Layout Builder Reorder 2.0.1 Minor update available for module layout_builder_reorder (2.0.1). Ban 1.1.0 Minor update available for module ban (1.1.0). Field Formatter Range 2.0.0 Major update available for module field_formatter_range (2.0.0). Field Formatter Range 8.x-1.8 Minor update available for module field_formatter_range (8.x-1.8). Varbase Media Header 9.2.1 Minor update available for module varbase_media_header (9.2.1). Search API Solr 4.3.11 Module search_api_solr updated after 14 months of inactivity (4.3.11). Content Translation Redirect Module content_translation_redirect crossed 1,000 active installs.

This module provides a dedicated logging system for custom events in your Drupal site, separate from core logging. It allows developers to store specific messages in a custom database table and view them through an administrative interface, ideal for tracking errors and crucial workflows in production without the overhead of full system logging.

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)

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

Activity

Total releases
2
First release
Apr 2026
Latest release
2 months ago
Releases (12 mo)
2 ▲ from 0
Maintenance
Active

Releases

Version Type Release date
1.0.0-alpha1 Pre-release Apr 19, 2026
1.x-dev Dev Apr 18, 2026