Skip to content

Commit 31938ea

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

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

logging.rst

Lines changed: 11 additions & 5 deletions
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy