File tree 1 file changed +11
-5
lines changed
1 file changed +11
-5
lines changed Original file line number Diff line number Diff line change 1
1
Logging
2
2
=======
3
3
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 `_.
7
8
8
9
The minimal log level can be changed by setting the ``SHELL_VERBOSITY `` environment variable:
9
10
@@ -17,8 +18,13 @@ The minimal log level can be changed by setting the ``SHELL_VERBOSITY`` environm
17
18
========================= =================
18
19
19
20
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 `.
22
28
23
29
Logging a Message
24
30
-----------------
You can’t perform that action at this time.
0 commit comments