Skip to content

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
logging.rst Outdated
----------------------------------

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

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

4 participants