Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions logging/channels_handlers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -172,3 +172,11 @@ need to tag your services:

With this, you can now send log messages to the ``foo`` channel by using
the automatically registered logger service ``monolog.logger.foo``.

.. configuration-block::

.. code-block:: php

// src/Controller/MainController.php
$logger = $this->get('monolog.logger.foo');
$logger->info('foobar');