Project

General

Profile

Actions

Bug #100309

open

core ProductionExceptionHandler does not show stacktrace in logs

Added by Sybille Peters about 1 year ago. Updated about 1 year ago.

Status:
New
Priority:
Should have
Assignee:
-
Category:
Logging
Target version:
-
Start date:
2023-03-27
Due date:
% Done:

0%

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

Description

There are different kinds of log messages created by different TYPO3 components.

The Frontend component="TYPO3.CMS.Frontend.ContentObject.Exception.ProductionExceptionHandler" writes a complete stack trace to the log.

The TYPO3.CMS.Core.Error.ProductionExceptionHandler (e.g. called in BE) does not.

This makes it difficult to troubleshoot these kinds of errors.

Example with TYPO3.CMS.Core.Error.ProductionExceptionHandler

(added line breaks for better reaability):

Sun, 26 Mar 2023 09:53:13 +0200 [CRITICAL] request="230e8bb9a282c" 
component="TYPO3.CMS.Core.Error.ProductionExceptionHandler": 
Core: Exception handler (WEB: BE): InvalidArgumentException, code #1436717322, 
file /var/www/mysite/releases/118/public/typo3/sysext/core/Classes/Http/Uri.php, line 125: 
The parsedUri "http:///something/or/other" appears to be malformed - 

{"mode":"WEB","application_mode":"BE","exception_class":"InvalidArgumentException","exception_code":1436717322,
"file":"/var/www/mysite/releases/118/public/typo3/sysext/core/Classes/Http/Uri.php","line":125,
"message":
"The parsedUri \"http:///something/or/other" appears to be malformed",
"request_url":"http:///something/or/other","exception":null}

Example with "TYPO3.CMS.Frontend.ContentObject.Exception.ProductionExceptionHandler"

Sun, 26 Mar 2023 11:49:22 +0200 [ALERT] request="bc9e08161a068" 
component="TYPO3.CMS.Frontend.ContentObject.Exception.ProductionExceptionHandler": 
Oops, an error occurred! Code: 202303260949217e3aa0de- RequiredArgumentMissingException: 
Required argument "mail" is not set for In2code\Powermail\Controller\FormController->create., 
in file /var/www/mysite/releases/118/public/typo3/sysext/extbase/Classes/Mvc/Controller/ActionController.php:1048 
- {"exception":"TYPO3\\CMS\\Extbase\\Mvc\\Controller\\Exception\\RequiredArgumentMissingException: Required argument \"mail\" is not set for In2code\\Powermail\\Controller\\FormController->create. 
in /var/www/mysite/releases/118/public/typo3/sysext/extbase/Classes/Mvc/Controller/ActionController.php:1048

Stack trace:
#0 /var/www/mysite/releases/118/public/typo3/sysext/extbase/Classes/Mvc/Controller/ActionController.php(485): TYPO3\\CMS\\Extbase\\Mvc\\Controller\\ActionController->mapRequestArgumentsToControllerArguments()
#1 /var/www/mysite/releases/118/public/typo3/sysext/extbase/Classes/Mvc/Dispatcher.php(96): TYPO3\\CMS\\Extbase\\Mvc\\Controller\\ActionController->processRequest(Object(TYPO3\\CMS\\Extbase\\Mvc\\Request))
#2 /var/www/mysite/releases/118/public/typo3/sysext/extbase/Classes/Mvc/Web/FrontendRequestHandler.php(46): TYPO3\\CMS\\Extbase\\Mvc\\Dispatcher->dispatch(Object(TYPO3\\CMS\\Extbase\\Mvc\\Request))
#3 

....
Actions #1

Updated by Sybille Peters about 1 year ago

  • Tracker changed from Feature to Bug
  • TYPO3 Version set to 11
 protected bool $logExceptionStackTrace = false;


exists in AbstractExceptionHandler

This is set to true in the DebugExceptionHandler. It would be helpful if it were possible to configure this for production and for logging only.

Actions

Also available in: Atom PDF