8000 Added information about injecting a logger to a service by hiddewie · Pull Request #7026 · symfony/symfony-docs · GitHub
[go: up one dir, main page]

Skip to content

Added information about injecting a logger to a service #7026

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

Merged
merged 2 commits into from
Mar 3, 2017
Merged

Added information about injecting a logger to a service #7026

merged 2 commits into from
Mar 3, 2017

Conversation

hiddewie
Copy link
Contributor
@hiddewie hiddewie commented Oct 2, 2016

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.

@hiddewie hiddewie changed the title Added information about injecting a logger to your service Added information about injecting a logger to a service Oct 2, 2016
----------------------------------

To use a logger in your own service, inject it using Dependency Injection
with ``@logger``. The tag ``monologlog.logger`` tag must be used. If you want to
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I find this phrase confusing: The tag monologlog.logger tag must be used. It looks like you must add that tag to the service where you use @logger.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have updated the sentence to mention the tag in combination with a specific channel.

Reverted whitespace

Fixed unclear sentence about the Monolog logger tag

Fixed committed whitespace
@xabbuh
Copy link
Member 8000
xabbuh commented Nov 11, 2016

👍

Status: Reviewed

Copy link
Member
@javiereguiluz javiereguiluz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hiddewie thanks for improving this article. I like a lot but I proposed some minor rewords.

The main change is to use "the problem" as the heading ("Using a Logger inside a Service") instead of "the solution" ("Injecting a Logger into a Service").

Users looking for information usually think in terms of the problem instead of the solution. But if you don't agree, we can revert this change. Thanks!

@hiddewie
Copy link
Contributor Author

Thank you!

Yeah, that is no problem! The change is welcome.

@xabbuh
Copy link
Member
xabbuh commented Mar 3, 2017

Thank you @hiddewie.

@xabbuh xabbuh merged commit a500ff3 into symfony:2.7 Mar 3, 2017
xabbuh added a commit that referenced this pull request 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
@hiddewie hiddewie deleted the logging-tags branch March 3, 2017 10:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
0