Skip to content

Commit 2812a62

Browse files
lyrixxOskarStark
andauthored
Apply suggestions from code review
Co-Authored-By: Oskar Stark <oskarstark@googlemail.com>
1 parent adc38c7 commit 2812a62

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

logging/handlers.rst

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@ handler with buffering capabilities (like the ``FingersCrossedHandler`` or
2020
``BufferHandler``) in order to call Elasticsearch only once with a bulk push. For
2121
even better performance and fault tolerance, a proper `ELK stack`_ is recommended.
2222

23-
To use it, declare it as a service:
24-
23+
You need to declare it as a service first:
2524

2625
.. configuration-block::
2726

@@ -53,12 +52,11 @@ To use it, declare it as a service:
5352
// config/services.php
5453
use App\Logger\SessionRequestProcessor;
5554
use Monolog\Formatter\LineFormatter;
56-
use Symfony\\Bridge\\Monolog\\Handler\\ElasticsearchLogstashHandler;
55+
use Symfony\Bridge\Monolog\Handler\ElasticsearchLogstashHandler;
5756
5857
$container->register(ElasticsearchLogstashHandler::class);
5958
60-
then reference it in monolog configuration:
61-
59+
then use this referenced service in your monolog configuration:
6260

6361
.. configuration-block::
6462

@@ -94,8 +92,8 @@ then reference it in monolog configuration:
9492
9593
.. code-block:: php
9694
97-
use Symfony\\Bridge\\Monolog\\Handler\\ElasticsearchLogstashHandler;
9895
// config/packages/prod/monolog.php
96+
use Symfony\Bridge\Monolog\Handler\ElasticsearchLogstashHandler;
9997
$container->loadFromExtension('monolog', [
10098
'handlers' => [
10199
'es' => [

0 commit comments

Comments
 (0)