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

[AdminBundle] Add a ConsoleExceptionListener to log errors in console commands #213

merged 7 commits into from Mar 25, 2015


None yet
4 participants
Copy link

woutervandamme commented Mar 18, 2015

added a ConsoleExcetpionListener to the adminBundle, this service can be toggled on or off in the app/config.yml file by adding the line: enable_console_exception_listener: true
to the kunstmaan_admin section.

KUNSTMAAN added some commits Mar 18, 2015

added consoleExceptionListener - this makes it to console exceptions …
…are logged instead of just shown ( this can be used for console command run truogh a cron job )
added a parameter to the config file to toggle the console logging on…
… or off, the default setting is false,

to enable this setting:

change the app/config.yml

    dashboard_route: 'kunstmaan_dashboard'
    enable_console_listener: true

woutervandamme added some commits Mar 19, 2015

@@ -47,6 +47,10 @@ public function load(array $configs, ContainerBuilder $container)
$loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
if (!empty($config['enable_console_listener']) && $config['enable_console_listener']) {

This comment has been minimized.


jockri Mar 19, 2015


enable_console_listener should be replaced by enable_console_exception_listener

@@ -0,0 +1,7 @@
class: Kunstmaan\AdminBundle\EventListener\ConsoleExceptionListener

This comment has been minimized.


jockri Mar 19, 2015


The classname should be configurable via a parameter. This makes it easier to overwrite the listener when needed.

woutervandamme added some commits Mar 19, 2015


This comment has been minimized.

Copy link

roderik commented Mar 23, 2015

After merging this, please enable the listener by default in the StandardEdition config.yml files.

krispypen added a commit that referenced this pull request Mar 25, 2015

@krispypen krispypen merged commit 67f7028 into Kunstmaan:master Mar 25, 2015

2 checks passed

Scrutinizer 3 updated code elements
continuous-integration/travis-ci/pr The Travis CI build passed

@roderik roderik added this to the Q1 2015 - v3.1 milestone Apr 7, 2015

@roderik roderik changed the title ConsoleExceptionListener [AdminBundle] Add a ConsoleExceptionListener to log errors in console commands Apr 7, 2015

@woutervandamme woutervandamme deleted the woutervandamme:consoleException branch Apr 8, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment