Closed (fixed)
Project:
Logger DB
Version:
1.0.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
4 Nov 2025 at 05:28 UTC
Updated:
11 Apr 2026 at 08:30 UTC
Jump to comment: Most recent
Comments
Comment #3
murzMade a quick implementation - it seems to work well, but needs review and deeper testing, so would be great to receive feedback from Monolog users, moving to "Needs review".
Comment #4
lussolucaLGTM, thanks!
Comment #5
mxr576Generally speaking, it looks good to me.
I have some ideas on how to postpone the initialization of the monolog handler when monolog is not enabled on the project, like with a ServiceProvider+CompilerPass combination or only access dependencies in the handler when they are actually needed via a service closure.
https://www.drupal.org/node/3451855
Comment #6
murzBut in what cases the service
monolog.handler.logger_dbcan be initialized if Monolog is not is not enabled? It will be just a definition in the list of services, with no initialization, as I understand.Comment #7
mxr576You can be right about that, but the definition exists inside the service container and could be accessed via its ID.
Comment #8
murzYes, just +1 definition for 1000 already existing ones will not make the things worse :) Alternatively, we should implement the dynamic service provider or hook, that will just overcomplicate the things with no benefits.
So, let's keep it as is. Who use Monolog on real projects, could you please check if this works well and provides suitable format of the log entry in the database? Cuz I use only Logger on my projects ;) and has not a lot of experience with Monolog.
Comment #9
murzAlternatively, I can introduce a new submodule logger_db_monolog or a separate project, but I think it's too much for such a simple task.
Comment #10
mxr576Added "Needs tests" tag ;P
Comment #11
murzFinally, with the Logger module improvements in the 1.0.0-alpha6, able to implement the planned functionality!
Now the Logger DB module has no mandatory dependencies and can work well with the default Drupal Core logger!
And if the Monolog module is installed, it adds the handler to work well with the Monolog module too.
And, of course, detects the Logger module and works well with it too.
Added tests to cover all the cases, but still need manual testing, reviewing the changes and feedback.
Comment #12
murzComment #14
murzThank yall, the feature is finally stabilized, finalized and merged! Now the Logger DB works well on its own, without any dependencies, and automatically extends the functionality if the Logger or Monolog is installed.
Comment #16
murz