@@ -81,21 +81,21 @@ Creating your own Channel
81
81
-------------------------
82
82
83
83
You can change the channel monolog logs to one service at a time. This is done
84
- by tagging your service with ``monolog.logger `` and specifying which channel
85
- the service should log to. By doing this, the logger that is injected into
86
- that service is preconfigured to use the channel you've specified.
87
-
88
- For more information - including a full example - read ":ref: `dic_tags-monolog `"
89
- in the Dependency Injection Tags reference section.
84
+ either via the :ref: `configuration <cookbook-monolog-channels-config >` below
85
+ or by tagging your service with :ref: `monolog.logger<dic_tags-monolog> ` and
86
+ specifying which channel the service should log to. With the tag, the logger
87
+ that is injected into that service is preconfigured to use the channel you've
88
+ specified.
90
89
91
90
.. _cookbook-monolog-channels-config :
92
91
93
92
Configure Additional Channels without Tagged Services
94
93
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
95
94
96
95
.. versionadded :: 2.3
97
- Since Symfony 2.3 you can install MonologBundle 2.4 to be able to configure
98
- additional channels in the configuration.
96
+ This feature was introduced to the MonologBundle in version 2.4. This
97
+ version is compatible with Symfony 2.3, but only MonologBundle 2.3 is
98
+ installed by default. To use this feature, upgrade your bundle manually.
99
99
100
100
With MonologBundle 2.4 you can configure additional channels without the
101
101
need to tag your services:
@@ -136,8 +136,7 @@ need to tag your services:
136
136
));
137
137
138
138
With this, you can now send log messages to the ``foo `` channel by using
139
- the automically registered logger service ``monolog.logger.foo ``.
140
-
139
+ the automatically registered logger service ``monolog.logger.foo ``.
141
140
142
141
Learn more from the Cookbook
143
142
----------------------------
0 commit comments