Problem/Motivation
The overall idea of the module is cool, but I have a vision of how to make the implementation of the module better:
1. Get rid of the dblog dependency, to allow using this module with any logger type - rework use just the EventSubscriber, instead of overwriting the whole logger.
2. Add more details about the response: response code, body size, duration, memory usage, etc.
3. Make including large data sections (such as headers) optional.
4. Add an option to log every request, not only requests with other logs - this will be very useful for profiling, especially together with the request duration and memory usage data.
5. Add support for passing the response details as structured metadata, to use with structured logging modules like Logger, OpenTelemetry, Extended Logger, etc.
6. Implement more cool things.
These will be breaking changes, so I want to release a 3.0 major version of this module, which will be a deep rework of the 2.x version.
And I am ready to implement all this from my side, and become a maintainer of the 3.x version of the module.
Issue fork request_logger-3549998
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
- 3549998-rework-with-new-features
changes, plain diff MR !3
Comments
Comment #3
murzI created a draft of the MR with the quick implementation of the idea: https://git.drupalcode.org/project/request_logger/-/merge_requests/3
Comment #4
rudolfbykerI welcome your contributions, and am excited to let you join as a maintainer, but I would like to discuss a few things first :)
The module as it is solves the following problem: "When an error is logged, add request info the the log entry so that we can see which request caused the error." This is a very narrow scope, and I'm open to expanding it, especially given the very generic name of this module! Your ideas seem good. However, I wonder if it would be possible to somehow still link errors to their corresponding requests.
Also, I think the new README should state what the purpose of the 1.x version is, vs. what the purpose of the 2.x version is, and how to solve the abovementioned problem using version 2.x if you are migrating from 1.x.
Comment #6
murzThis feature is implemented in the MR https://www.drupal.org/project/logger/issues/3551603
Comment #7
murzReleased the 3.0 alpha version with new features. Let's close this as fixed.
Comment #9
murz