-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
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
Conversation
---------------------------------- | ||
|
||
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 |
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.
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
.
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.
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
👍 Status: Reviewed |
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.
@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!
Thank you! Yeah, that is no problem! The change is welcome. |
Thank you @hiddewie. |
…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
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.