Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit109c67d

Browse files
committed
[symfony#3205] Minor tweaks to new channels config
1 parentd2c61a5 commit109c67d

File tree

2 files changed

+13
-14
lines changed

2 files changed

+13
-14
lines changed

‎cookbook/logging/channels_handlers.rst

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -81,21 +81,21 @@ Creating your own Channel
8181
-------------------------
8282

8383
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.
9089

9190
.. _cookbook-monolog-channels-config:
9291

9392
Configure Additional Channels without Tagged Services
9493
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
9594

9695
..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.
9999

100100
With MonologBundle 2.4 you can configure additional channels without the
101101
need to tag your services:
@@ -136,8 +136,7 @@ need to tag your services:
136136
));
137137
138138
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``.
141140

142141
Learn more from the Cookbook
143142
----------------------------

‎reference/dic_tags.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -650,10 +650,10 @@ channel when injecting the logger in a service.
650650
$container->register('my_service', $definition);
651651
652652
.. tip::
653-
If you use MonologBundle in version 2.4 or above, you are able to configure
654-
your custom channels in the application configuration and retrieve the
655-
corresponding logger service fromtheservice container directly (see
656-
:ref:`cookbook-monolog-channels-config`).
653+
654+
If you use MonologBundle 2.4 or higher, you can configure custom channels
655+
in the configuration and retrievethecorresponding logger service from
656+
the service container directly (see:ref:`cookbook-monolog-channels-config`).
657657
658658
.. _dic_tags-monolog-processor:
659659

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp