-
-
Notifications
You must be signed in to change notification settings - Fork 455
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow to use dbal logging middleware instead of deprecated SQLLogger #1456
Allow to use dbal logging middleware instead of deprecated SQLLogger #1456
Conversation
5563641
to
2ac02d3
Compare
To me, there is no reason for having a configuration for that. The core loggers should be wired as middles rather than loggers on newer DBAL versions without any config change. |
d35d639
to
75adbe9
Compare
like @stof said, this should work without change in configuration |
75adbe9
to
f5bb700
Compare
@stof @ostrolucky thank you for your feedbacks, the point is the logged message formats are not the same; for a basic query, with SQLLogger:
and with logging middleware:
It might be a problem if one do parsing of these logs for some reason. It's why I suggest an opt-in for this change. |
I see. That change is fine, we don't provide BC promise for log format. |
Ok, so I'm going to remove the opt-in. |
instead of deprecated SQLLogger
f5bb700
to
c416af5
Compare
Does this solve the deprecations we currently have? See https://github.com/doctrine/DoctrineBundle/runs/4681778064?check_suite_focus=true I am thinking if it wouldn't be better to remove definition of doctrine.dbal.logger completely, instead of only its arguments. |
No, it doesn't, removing these deprecations needs two steps, the second (#1431) is about the profiler and involve to modify Doctrine Bridge (IMHO). I can work on it after this one. We can't remove |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems good to me. Tested it on my project and only noticed the different log message format. Apart from that all works well.
Next step would be to replace the data collection part for the profiler then? Like DebugStack
and BacktraceLogger
?
fair enough, let's merge it then |
…Logger (l-vo) This PR was merged into the 5.4 branch. Discussion ---------- [DoctrineBridge] Allow to use a middleware instead of DbalLogger | Q | A | ------------- | --- | Branch? | 5.4 | Bug fix? | no | New feature? | yes | Deprecations? | no | Tickets | Step toward the fix of doctrine/DoctrineBundle#1431 (mentioned too in #44313 and #44495) | License | MIT | Doc PR | The SqlLogger that is used in doctrine bridge and doctrine bundle has been deprecated and replaced by a system of Middleware. A work has started on Doctrine bundle with doctrine/DoctrineBundle#1456 and doctrine/DoctrineBundle#1472 This PR suggest to add a middleware thats covers what was previously done by `DbalLogger` and `DebugStack`. Another PR will follow in DoctrineBundle for the integration. Commits ------- 20d0806 Allow to use a middleware instead of DbalLogger
It does not really fix the deprecation warnings, right? It just fixes if we add a middleware class. Am I right? |
@r-martins Yes, this is a step to fix them since it involves changes on Symfony too. The changes on Symfony are now merged but a final step is still missing in DoctrineBundle. I'm working on it. |
Fixes #1429