-
-
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
Fix error for logging middleware when logger is missing #1488
Fix error for logging middleware when logger is missing #1488
Conversation
9a0ff93
to
cc418eb
Compare
2f28f6a
to
cb0ad28
Compare
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.
thanks for looking into this 👍
Tests/DependencyInjection/Compiler/RemoveLoggingMiddlewarePassTest.php
Outdated
Show resolved
Hide resolved
cb0ad28
to
f2aeead
Compare
f2aeead
to
cbd8a94
Compare
@dmaicher changes applied |
Tested it myself: Works fine if no @ostrolucky do you want to have a look? Or shall I go ahead and merge it? |
I probably won't review this today. You can go ahead if you feel this is urgent. I don't personally see the urgency: who the heck doesn't have logger in prod? |
Thank you! I'll try on monday. Have a good weekend |
@l-vo Is it really need to always remove DoctrineBundle/DependencyInjection/Compiler/RemoveLoggingMiddlewarePass.php Lines 9 to 19 in 0ad7b24
I'm trying to set my custom App\Doctrine\SQLLogger:
arguments:
$logFilename: '%kernel.logs_dir%/sql.log'
doctrine.dbal.logging_middleware:
class: 'Doctrine\DBAL\Logging\Middleware'
arguments:
- '@App\Doctrine\SQLLogger' And this config doesn't work until I do something like this: logger:
class: 'Psr\Log\NullLogger' |
@yura3d What about using your own service id instead of reusing |
@l-vo Sorry, seems I didn't read the docs carefully. Thanks! |
Fix #1487