8000 Monolog logging page should mention the DIC tags · Issue #7011 · symfony/symfony-docs · GitHub
[go: up one dir, main page]

Skip to content

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

Closed
linaori opened this issue Sep 26, 2016 · 3 comments
Closed

Monolog logging page should mention the DIC tags #7011

linaori opened this issue Sep 26, 2016 · 3 comments
Labels

Comments

@linaori
Copy link
Contributor
linaori commented Sep 26, 2016

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.

@xabbuh xabbuh added the Logger label Sep 27, 2016
@hiddewie
Copy link
Contributor
hiddewie commented Oct 1, 2016

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?
The links in both sections both explain their respective tag and link to the DIC reference page.

What points should be added?

@linaori
Copy link
Contributor Author
linaori commented Oct 1, 2016

Neither of them are showing how to inject a specific logger

xabbuh added a commit that referenced this issue Mar 3, 2017
…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
@javiereguiluz
Copy link
Member

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants
0