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). Provus Mega Menu Module provus_mega_menu crossed 1,000 active installs.

This module allows developers to capture and store prompts sent to and outputs received from LLMs as entities. This enables review and debugging of AI interactions. It is recommended to configure storage limits to manage the large amount of data generated.

The recommended route now is to use the AI core module's sub-module "AI Observability".

The AI logging module allows developers to capture prompts sent to and outputs received from LLMs by other modules and store them as entities to allow for review and debugging. Whilst this module is safe to use on a production environment, it stores a large amount of data into the database and so is recommended to keep the maximum quantity and time limits enabled for the amount of logs to store.

Installation

The module should be enabled as normal, which will add the bundleable AI Log entity to the site.

However, due to the large amount of data logging produces, no logging will begin until the module is configured:

  1. Visit /admin/config/ai/logging/settings
  2. Check the "Log requests" checkbox to enable logging of requests.
  3. If you also wish to log the response from the LLM, check the "Log response" checkbox.
  4. All requests sent to an LLM are tagged with the operation type being used: if you only wish to log the request and/or response from specific operations, enter their names in the "Request Tags" box. Multiple tags should be added as a comma-separated list. To find out more about the Operation Types, please refer to the Making AI Base Calls section of the documentation.
  5. Enter the maximum number of log entities to retain: once the number of log entries exceeds this limit, the earliest logs will be deleted.
  6. Enter the number of days to keep log messages for. Once any log message exceeds this age, it will be deleted regardless of the maximum retained number of logs.
  7. Save the configuration, and logging will begin with the next request sent to an LLM. Logs can be viewed at /admin/config/ai/logging/collection.

Drush commands

E.g. drush ai:logs; see the Drush Commands file for full options.

When to use

This module is maintained and compatible with the AI Logging module when it was part of AI Core. It is heavier than AI Observability because it uses a fieldable entity system to store each log as an AI Log.

Consider using the "AI Observability" sub-module of AI Core instead. There is no migration path between the two.

Activity

Total releases
5
First release
Dec 2025
Latest release
2 weeks ago
Releases (12 mo)
5 ▲ from 0
Maintenance
Active

Release Timeline

Releases

Version Type Release date
2.0.0-alpha2 Pre-release Jul 2, 2026
1.3.0-alpha1 Pre-release Jul 2, 2026
1.3.x-dev Dev Jul 2, 2026
2.0.0-alpha1 Pre-release Dec 18, 2025
2.0.x-dev Dev Dec 18, 2025