Project

General

Profile

Actions

Bug #99493

closed

On CLI no exceptions are logged

Added by Helmut Hummel almost 2 years ago. Updated 3 months ago.

Status:
Closed
Priority:
Should have
Assignee:
Category:
Logging
Target version:
-
Start date:
2023-01-08
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
11
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

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


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #99912: ProductionExceptionHandler does not handle CLI ExceptionsClosed2023-02-09

Actions
Actions #1

Updated by Andreas Kienast over 1 year ago

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.

Actions #2

Updated by Torben Hansen over 1 year ago

  • Related to Bug #99912: ProductionExceptionHandler does not handle CLI Exceptions added
Actions #3

Updated by Torben Hansen over 1 year ago

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.

Actions #4

Updated by Torben Hansen over 1 year ago

Created a new issue for my suggestion - see #100871

Actions #5

Updated by Helmut Hummel over 1 year ago

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?

Actions #6

Updated by Garvin Hicking 3 months ago

  • 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!

Actions

Also available in: Atom PDF