File tree Expand file tree Collapse file tree 3 files changed +21
-17
lines changed Expand file tree Collapse file tree 3 files changed +21
-17
lines changed Original file line number Diff line number Diff line change @@ -337,13 +337,13 @@ Learn more
337
337
.. toctree ::
338
338
:maxdepth: 1
339
339
340
- logging/monolog_regex_based_excludes
341
340
logging/monolog_email
342
341
logging/channels_handlers
343
- logging/monolog_console
344
- logging/disable_microsecond_precision
345
342
logging/formatter
346
343
logging/processors
344
+ logging/monolog_regex_based_excludes
345
+ logging/monolog_console
346
+ logging/disable_microsecond_precision
347
347
348
348
.. _Monolog : https://github.com/Seldaek/monolog
349
349
.. _LoggerInterface : https://github.com/php-fig/log/blob/master/Psr/Log/LoggerInterface.php
Original file line number Diff line number Diff line change @@ -38,19 +38,23 @@ The example above could then be rewritten as::
38
38
use Psr\Log\LoggerInterface;
39
39
use Symfony\Component\Console\Input\InputInterface;
40
40
use Symfony\Component\Console\Output\OutputInterface;
41
-
42
- private $logger;
43
-
44
- public function __constructor(LoggerInterface $logger)
41
+ // ...
42
+
43
+ class YourCommand extends Command
45
44
{
46
- $this->logger = $logger;
47
- }
45
+ private $logger;
48
46
49
- protected function execute(InputInterface $input, OutputInterface $output)
50
- {
51
- $this->logger->debug('Some info');
52
- // ...
53
- $this->logger->notice('Some more info');
47
+ public function __constructor(LoggerInterface $logger)
48
+ {
49
+ $this->logger = $logger;
50
+ }
51
+
52
+ protected function execute(InputInterface $input, OutputInterface $output)
53
+ {
54
+ $this->logger->debug('Some info');
55
+ // ...
56
+ $this->logger->notice('Some more info');
57
+ }
54
58
}
55
59
56
60
Depending on the verbosity level that the command is run in and the user's
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ configuration:
16
16
17
17
.. code-block :: yaml
18
18
19
- # config/packages/monolog.yaml
19
+ # config/packages/prod/ monolog.yaml
20
20
monolog :
21
21
handlers :
22
22
main :
@@ -28,7 +28,7 @@ configuration:
28
28
29
29
.. code-block :: xml
30
30
31
- <!-- config/packages/monolog.xml -->
31
+ <!-- config/packages/prod/ monolog.xml -->
32
32
<container xmlns =" http://symfony.com/schema/dic/services"
33
33
xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
34
34
xmlns : monolog =" http://symfony.com/schema/dic/monolog"
@@ -47,7 +47,7 @@ configuration:
47
47
48
48
.. code-block :: php
49
49
50
- // config/packages/monolog.php
50
+ // config/packages/prod/ monolog.php
51
51
$container->loadFromExtension('monolog', array(
52
52
'handlers' => array(
53
53
'main' => array(
You can’t perform that action at this time.
0 commit comments