Bug #99493
closed
On CLI no exceptions are logged
Added by Helmut Hummel almost 2 years ago.
Updated 4 months ago.
Description
Since symfony/console catches all exceptions from commands
to render the exception, the TYPO3 exception handler is never triggered,
thus not only completely unused on CLI, but also does not log anything
to the configured logs
The easiest solution is to set $this->application->setCatchExceptions(false);
in typo3/sysext/core/Classes/Console/CommandApplication.php
, with the downside that exceptions are not pretty-printed anymore in CLI.
- Related to Bug #99912: ProductionExceptionHandler does not handle CLI Exceptions added
With #99912, setCatchExceptions(false)
has been implemented. So now we have exceptions, but as afernandez
wrote, this looks not very nice. I think, our ExceptionHandlers should at least try to catch/pretty print common Symfony exceptions like CommandNotFoundException
and avoid throwing them.
Created a new issue for my suggestion - see #100871
Torben Hansen wrote in #note-4:
Created a new issue for my suggestion - see #100871
Hm, ok. So now we have 3 tickets tackling the same issue? Any reasons for this? Should be maybe consolidate that somehow? Which is the ticket we want to proceed in?
- Category set to Logging
- Status changed from New to Closed
If I read this right, with the implementation of #100871 this got addressed? Please get in touch if this is wrong and we can see how to consolidate. Thanks!
Also available in: Atom
PDF