Skip to content
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

Rename command logging services #6575

Closed
wants to merge 2 commits into from
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
12 changes: 6 additions & 6 deletions cookbook/console/logging.rst
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ First configure a listener for console exception events in the service container

# app/config/services.yml
services:
kernel.listener.command_dispatch:
app.listener.command_exception:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unrelated to this pull request, but shouldn't these services be called app.* instead of kernel.* ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are right, that makes more sense. Do you want me to update the PR?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That would be good. There is no need to do this in another PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

class: AppBundle\EventListener\ConsoleExceptionListener
arguments: ['@logger']
tags:
Expand All @@ -96,7 +96,7 @@ First configure a listener for console exception events in the service container
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">

<services>
<service id="kernel.listener.command_dispatch" class="AppBundle\EventListener\ConsoleExceptionListener">
<service id="app.listener.command_exception" class="AppBundle\EventListener\ConsoleExceptionListener">
<argument type="service" id="logger"/>
<tag name="kernel.event_listener" event="console.exception" />
</service>
Expand All @@ -118,7 +118,7 @@ First configure a listener for console exception events in the service container
array('event' => 'console.exception')
);
$container->setDefinition(
'kernel.listener.command_dispatch',
'app.listener.command_exception',
$definitionConsoleExceptionListener
);

Expand Down Expand Up @@ -178,7 +178,7 @@ First configure a listener for console terminate events in the service container

# app/config/services.yml
services:
kernel.listener.command_dispatch:
app.listener.command_error:
class: AppBundle\EventListener\ErrorLoggerListener
arguments: ['@logger']
tags:
Expand All @@ -193,7 +193,7 @@ First configure a listener for console terminate events in the service container
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">

<services>
<service id="kernel.listener.command_dispatch" class="AppBundle\EventListener\ErrorLoggerListener">
<service id="app.listener.command_error" class="AppBundle\EventListener\ErrorLoggerListener">
<argument type="service" id="logger"/>
<tag name="kernel.event_listener" event="console.terminate" />
</service>
Expand All @@ -215,7 +215,7 @@ First configure a listener for console terminate events in the service container
array('event' => 'console.terminate')
);
$container->setDefinition(
'kernel.listener.command_dispatch',
'app.listener.command_error',
$definitionErrorLoggerListener
);

Expand Down