Skip to content

Remove horizontal scrollbar #4876

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 25, 2015
Merged
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
64 changes: 45 additions & 19 deletions cookbook/logging/monolog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,10 @@ allows you to log the messages in several ways easily.
<container xmlns="http://symfony.com/schema/dic/services"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:monolog="http://symfony.com/schema/dic/monolog"
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd
http://symfony.com/schema/dic/monolog http://symfony.com/schema/dic/monolog/monolog-1.0.xsd">
xsi:schemaLocation="http://symfony.com/schema/dic/services
http://symfony.com/schema/dic/services/services-1.0.xsd
http://symfony.com/schema/dic/monolog
http://symfony.com/schema/dic/monolog/monolog-1.0.xsd">

<monolog:config>
<monolog:handler
Expand Down Expand Up @@ -140,7 +142,7 @@ allows you to log the messages in several ways easily.
));

The above configuration defines a stack of handlers which will be called
in the order where they are defined.
in the order they are defined.

.. tip::

Expand Down Expand Up @@ -185,8 +187,10 @@ easily. Your formatter must implement
<container xmlns="http://symfony.com/schema/dic/services"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:monolog="http://symfony.com/schema/dic/monolog"
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd
http://symfony.com/schema/dic/monolog http://symfony.com/schema/dic/monolog/monolog-1.0.xsd">
xsi:schemaLocation="http://symfony.com/schema/dic/services
http://symfony.com/schema/dic/services/services-1.0.xsd
http://symfony.com/schema/dic/monolog
http://symfony.com/schema/dic/monolog/monolog-1.0.xsd">

<services>
<service id="my_formatter" class="Monolog\Formatter\JsonFormatter" />
Expand Down Expand Up @@ -301,15 +305,21 @@ using a processor.
<container xmlns="http://symfony.com/schema/dic/services"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:monolog="http://symfony.com/schema/dic/monolog"
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd
http://symfony.com/schema/dic/monolog http://symfony.com/schema/dic/monolog/monolog-1.0.xsd">
xsi:schemaLocation="http://symfony.com/schema/dic/services
http://symfony.com/schema/dic/services/services-1.0.xsd
http://symfony.com/schema/dic/monolog
http://symfony.com/schema/dic/monolog/monolog-1.0.xsd">

<services>
<service id="monolog.formatter.session_request" class="Monolog\Formatter\LineFormatter">
<service id="monolog.formatter.session_request"
class="Monolog\Formatter\LineFormatter">

<argument>[%%datetime%%] [%%extra.token%%] %%channel%%.%%level_name%%: %%message%%&#xA;</argument>
</service>

<service id="monolog.processor.session_request" class="Acme\MyBundle\SessionRequestProcessor">
<service id="monolog.processor.session_request"
class="Acme\MyBundle\SessionRequestProcessor">

<argument type="service" id="session" />
<tag name="monolog.processor" method="processRecord" />
</service>
Expand All @@ -330,11 +340,17 @@ using a processor.

// app/config/config.php
$container
->register('monolog.formatter.session_request', 'Monolog\Formatter\LineFormatter')
->register(
'monolog.formatter.session_request',
'Monolog\Formatter\LineFormatter'
)
->addArgument('[%%datetime%%] [%%extra.token%%] %%channel%%.%%level_name%%: %%message%%\n');

$container
->register('monolog.processor.session_request', 'Acme\MyBundle\SessionRequestProcessor')
->register(
'monolog.processor.session_request',
'Acme\MyBundle\SessionRequestProcessor'
)
->addArgument(new Reference('session'))
->addTag('monolog.processor', array('method' => 'processRecord'));

Expand Down Expand Up @@ -383,10 +399,12 @@ the ``monolog.processor`` tag:
xsi:schemaLocation="http://symfony.com/schema/dic/services
http://symfony.com/schema/dic/services/services-1.0.xsd
http://symfony.com/schema/dic/monolog
http://symfony.com/schema/dic/monolog/monolog-1.0.xsd"
>
http://symfony.com/schema/dic/monolog/monolog-1.0.xsd">

<services>
<service id="monolog.processor.session_request" class="Acme\MyBundle\SessionRequestProcessor">
<service id="monolog.processor.session_request"
class="Acme\MyBundle\SessionRequestProcessor">

<argument type="service" id="session" />
<tag name="monolog.processor" method="processRecord" handler="main" />
</service>
Expand All @@ -397,7 +415,10 @@ the ``monolog.processor`` tag:

// app/config/config.php
$container
->register('monolog.processor.session_request', 'Acme\MyBundle\SessionRequestProcessor')
->register(
'monolog.processor.session_request',
'Acme\MyBundle\SessionRequestProcessor'
)
->addArgument(new Reference('session'))
->addTag('monolog.processor', array('method' => 'processRecord', 'handler' => 'main'));

Expand Down Expand Up @@ -429,10 +450,12 @@ the ``monolog.processor`` tag:
xsi:schemaLocation="http://symfony.com/schema/dic/services
http://symfony.com/schema/dic/services/services-1.0.xsd
http://symfony.com/schema/dic/monolog
http://symfony.com/schema/dic/monolog/monolog-1.0.xsd"
>
http://symfony.com/schema/dic/monolog/monolog-1.0.xsd">

<services>
<service id="monolog.processor.session_request" class="Acme\MyBundle\SessionRequestProcessor">
<service id="monolog.processor.session_request"
class="Acme\MyBundle\SessionRequestProcessor">

<argument type="service" id="session" />
<tag name="monolog.processor" method="processRecord" channel="main" />
</service>
Expand All @@ -443,7 +466,10 @@ the ``monolog.processor`` tag:

// app/config/config.php
$container
->register('monolog.processor.session_request', 'Acme\MyBundle\SessionRequestProcessor')
->register(
'monolog.processor.session_request',
'Acme\MyBundle\SessionRequestProcessor'
)
->addArgument(new Reference('session'))
->addTag('monolog.processor', array('method' => 'processRecord', 'channel' => 'main'));

Expand Down