Skip to content

Commit 32e5bfc

Browse files
committed
[#8683] Tweaks based on feedback
1 parent bafb1a8 commit 32e5bfc

File tree

3 files changed

+21
-17
lines changed

3 files changed

+21
-17
lines changed

logging.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -337,13 +337,13 @@ Learn more
337337
.. toctree::
338338
:maxdepth: 1
339339

340-
logging/monolog_regex_based_excludes
341340
logging/monolog_email
342341
logging/channels_handlers
343-
logging/monolog_console
344-
logging/disable_microsecond_precision
345342
logging/formatter
346343
logging/processors
344+
logging/monolog_regex_based_excludes
345+
logging/monolog_console
346+
logging/disable_microsecond_precision
347347

348348
.. _Monolog: https://github.com/Seldaek/monolog
349349
.. _LoggerInterface: https://github.com/php-fig/log/blob/master/Psr/Log/LoggerInterface.php

logging/monolog_console.rst

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -38,19 +38,23 @@ The example above could then be rewritten as::
3838
use Psr\Log\LoggerInterface;
3939
use Symfony\Component\Console\Input\InputInterface;
4040
use Symfony\Component\Console\Output\OutputInterface;
41-
42-
private $logger;
43-
44-
public function __constructor(LoggerInterface $logger)
41+
// ...
42+
43+
class YourCommand extends Command
4544
{
46-
$this->logger = $logger;
47-
}
45+
private $logger;
4846

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+
}
5458
}
5559

5660
Depending on the verbosity level that the command is run in and the user's

logging/monolog_regex_based_excludes.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ configuration:
1616

1717
.. code-block:: yaml
1818
19-
# config/packages/monolog.yaml
19+
# config/packages/prod/monolog.yaml
2020
monolog:
2121
handlers:
2222
main:
@@ -28,7 +28,7 @@ configuration:
2828
2929
.. code-block:: xml
3030
31-
<!-- config/packages/monolog.xml -->
31+
<!-- config/packages/prod/monolog.xml -->
3232
<container xmlns="http://symfony.com/schema/dic/services"
3333
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3434
xmlns:monolog="http://symfony.com/schema/dic/monolog"
@@ -47,7 +47,7 @@ configuration:
4747
4848
.. code-block:: php
4949
50-
// config/packages/monolog.php
50+
// config/packages/prod/monolog.php
5151
$container->loadFromExtension('monolog', array(
5252
'handlers' => array(
5353
'main' => array(

0 commit comments

Comments
 (0)