Adds the ability to refine filtering

Created on 23 October 2024, 2 months ago

Problem/Motivation

Currently, the JSON Request Logger module logs all incoming requests without offering detailed filtering options to specify which types of requests should be logged. This results in an excess of unnecessary data, making log analysis more challenging. Additionally, there's no option to customize the output format using replacement variables, limiting flexibility when configuring logs based on project needs.

Steps to reproduce

  • Install and enable the **JSON:API Request Logger** module.
  • Make a request to any API endpoint.
  • Review the generated logs in the system.
  • Notice the lack of filtering options for which types of requests are logged and no option to customize the log output format.

Proposed resolution

  • Implement a configuration system allowing administrators to define logging filter criteria (e.g., filter by HTTP method, content type, or specific request parameters).
  • Add the ability to customize the log format using replacement variables. These could include, but are not limited to, the requested content type, query parameters, HTTP method, server response, etc.
  • Ensure backward compatibility with existing installations to avoid breaking current setups.

Remaining tasks

  • Add configuration options for logging filters.
  • Implement the replacement variable system for customizable log output.
  • Update the module documentation with instructions on how to use these new features.

User interface changes

  • A new section will be added to the module's configuration page to define log filters and log output replacement variables. This interface will be accessible from the module’s configuration page in the Drupal administration.

API changes

  • No changes to the module's API are expected.

Data model changes

  • No changes to the data model are expected.
πŸ“Œ Task
Status

Active

Version

1.0

Component

Code

Created by

πŸ‡ͺπŸ‡ΈSpain dcimorra πŸ‡ͺπŸ‡Έ Spain

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024