Skip to content

Commit dc81cd0

Browse files
committed
Merge branch '7.1' into 7.2
* 7.1: Minor tweaks [Logging] Add references to the `ConsoleLogger`
2 parents c374d33 + 31938ea commit dc81cd0

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

logging.rst

+11-5
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
Logging
22
=======
33

4-
Symfony comes with a minimalist `PSR-3`_ logger: :class:`Symfony\\Component\\HttpKernel\\Log\\Logger`.
5-
In conformance with `the twelve-factor app methodology`_, it sends messages starting from the
6-
``WARNING`` level to `stderr`_.
4+
Symfony comes with two minimalist `PSR-3`_ loggers: :class:`Symfony\\Component\\HttpKernel\\Log\\Logger`
5+
for the HTTP context and :class:`Symfony\\Component\\Console\\Logger\\ConsoleLogger` for the
6+
CLI context. In conformance with `the twelve-factor app methodology`_, they send messages
7+
starting from the ``WARNING`` level to `stderr`_.
78

89
The minimal log level can be changed by setting the ``SHELL_VERBOSITY`` environment variable:
910

@@ -17,8 +18,13 @@ The minimal log level can be changed by setting the ``SHELL_VERBOSITY`` environm
1718
========================= =================
1819

1920
The minimum log level, the default output and the log format can also be changed by
20-
passing the appropriate arguments to the constructor of :class:`Symfony\\Component\\HttpKernel\\Log\\Logger`.
21-
To do so, :ref:`override the "logger" service definition <service-psr4-loader>`.
21+
passing the appropriate arguments to the constructor of :class:`Symfony\\Component\\HttpKernel\\Log\\Logger`
22+
and :class:`Symfony\\Component\\Console\\Logger\\ConsoleLogger`.
23+
24+
The :class:`Symfony\\Component\\HttpKernel\\Log\\Logger` class is available through the ``logger`` service.
25+
To pass your configuration, you can :ref:`override the "logger" service definition <service-psr4-loader>`.
26+
27+
For more information about ``ConsoleLogger``, see :doc:`/components/console/logger`.
2228

2329
Logging a Message
2430
-----------------

0 commit comments

Comments
 (0)