-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Monolog logging page should mention the DIC tags #7011
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
Comments
Are those two tags not described by the section on logging to different locations (handlers and channels) and on adding extra data to a log entry? What points should be added? |
Neither of them are showing how to inject a specific logger |
…hiddewie, javiereguiluz) This PR was merged into the 2.7 branch. Discussion ---------- Added information about injecting a logger to a service Issue #7011. I've added a small piece about injecting a logger to a service. However, the separate page about processors seems quite clear to me, also about the DI tags. Commits ------- a500ff3 Proposed a minor reword c8992e6 Added information about injecting a logger to your service
I'm closing this old issue as "won't fix" because now that we have Flex, autowiring and autoconfiguration, the recommended way to inject a specific logger is the one explained in #10049. Thanks! |
Monolog has 2 tags that can be used. I was specifically looking for
{ name: monolog.logger, channel: acme }
. Eventually after like 10 minutes I found this page:http://symfony.com/doc/current/reference/dic_tags.html#monolog-logger
However, I would expect both tags to also be mentioned on http://symfony.com/doc/current/logging.html as that's where you end up. I had google for terms like "symfony monolog service injection" but it wouldn't show up until I was specifically looking for the dic tags.
The text was updated successfully, but these errors were encountered: