Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

Request Logger

Security covered Under active development 17 sites

This module logs detailed information about every HTTP request and its response, including request method, path, headers, response duration, size, and memory usage. This data is valuable for monitoring site performance and analyzing user activity.

Logs every HTTP request to the website with response details sent to the standard logger, including responses returned directly from cache. It acts as an Apache/Nginx access.log, but stores more useful metadata about the request (timestamp in milliseconds, separate path, query string, headers, attributes) and the response (response generation duration in milliseconds, size, memory usage, cache hit/miss, headers, etc).

This data is useful for monitoring site performance, tracking cache hit rates, and building other analytics reports.

For debugging, you can temporarily enable logging of full HTTP headers and add other custom fields.

Usage

Just install the module and it works out of the box, adding a new log entry for each request to the website.

On the settings page /admin/config/development/request_logger (Home » Administration » Configuration » Development » Request Logger) you can choose exactly which data to store in the logs.

Using this module, you can completely disable the Apache/Nginx access.log because the same information can be logged via the Logger module with richer details and saved to the same access.log file, just like Apache/Nginx.

There is also a submodule Request Logger Reports that provides viewing logs directly in the Drupal Admin Panel with the ability to aggregate, filter and sort logs by any custom field (eg, sort requests by duration or memory usage), and to build custom metrics and reports.

The Request Logger Charts submodule adds Chart.js charts on top of those reports (for example, page cache hit/miss rate).

The Reports and Charts submodules provide just pre-configured Views pages, so you can easily customize them for your own needs by editing the View settings.

Also, you can duplicate the provided Views to create multiple reports that display only required custom columns from your logs and with custom filters.

Log Outgoing Requests

The Request Logger Outgoing submodule logs outgoing HTTP requests made by Drupal and other modules. This module can be installed and used separately without the main module, if you need to log only outgoing requests.

Extended Structured Logs

By default, this module works well with the default Drupal loggers (DBLog and Syslog) and stores basic request and response details in the log message string.

To store more details about the request and response, install the Logger module — it will extend log entries with structured data, allowing you to build custom reports and charts by any custom field from the log entry (for example, average response time or memory usage per request, or regexp matches).

The Logger DB module provides viewing logs directly in the Drupal Admin Panel with the ability to aggregate, filter and sort logs by any custom field (eg, sort requests by duration or memory usage), and to build metrics, reports, and charts.

A submodule "Request Logger Reports" provides displaying logged requests and responses directly in the Drupal Admin Panel with the ability to filter by any custom field using the Logger DB module.

Log Entry Example

{
  "timestamp_float": 1759500536.654993,
  "message": "GET /node - query: page=2&user=3, response: duration: 0.227 sec, memory: 3.518 MB, page cache: HIT",
  "channel": "request_logger",
  "severity": 6,
  "uid": 0,
  "metadata": {
    "request": {
      "method": "GET",
      "path": "/mode",
      "query": "page=2&user=3",
      "uuid": "a5e06180-6348-4dcd-920f-91386a34dc21"
    },
    "response": {
      "code": 200,
      "size": 42749,
      "duration": 0.227,
      "memory_usage": 3688552,
      "memory_usage_peak": 5021640,
      "page_cache": "HIT"
    }
  }
}

Alternatives

  • OpenTelemetry - provides a more powerful observability suite to log not only requests, but also metrics and traces.

Previous version (2.x)

The previous approach in the 2.x branch extends and overrides the core DB Logger service to add HTTP request data to the logs. Especially useful for decoupled sites, where you need to see what POST requests caused PHP exceptions or other 5xx errors.

Usage:

  1. Install and enable the module.
  2. All log entries with a severity of ERROR or higher (i.e. RFC 5424 numerical code lower than or equal to 3) will include extra information about the HTTP request in the DB logs at `/admin/reports/dblog`.

Fund the project at: www.refstudycentre.com/contact#donations

Ask your assistant about Request Logger

Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works

Depends on

Dependencies of the latest stable release

No dependencies recorded for this project.

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
4
Tracked since
Oct 2025
Latest release
7 months ago
Releases (12 mo)
2
Maintenance
Slowing

Release Timeline

Releases

Version Type Core PHP Release date
3.0.0-alpha3 Pre-release 11 Mar 13, 2026
3.0.0-alpha2 Pre-release 11 Oct 17, 2025
3.0.0-alpha1 Pre-release 11 Oct 7, 2025
3.x-dev Dev 11 Oct 7, 2025