symfony - Symfony2 ConsoleExceptionListener ConsoleExceptionEvent get Arguments and Options -
i have implemented console exception listener explained in http://symfony.com/doc/current/cookbook/console/logging.html#enabling-automatic-exceptions-logging works expected.
but have cronjobs execute commands require arguments , options , add arguments , options log, have more specific detail of caused error.
how can that? inside command class haven't see public function arguments or options
i found answer looking in wrong place
$command = $event->getcommand();
as described in question command has no methods it
but
consoleexceptionevent $event
has method input (arguments , options)
$event->getinput();
Comments
Post a Comment