Bug #84646

Exception in ErrorHandler if problem instantiating logger (Reboustness)

Added by Sybille Peters about 3 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Logging
Target version:
-
Start date:
2018-04-06
Due date:
% Done:

100%

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

Description

In the BE the following error is displayed if the logging api is enabled:

 Fatal error: Uncaught Error: Call to a member function log() on null in /var/www/t3coredev/typo3/sysext/core/Classes/Error/ErrorHandler.php on line 132
( ! ) Error: Call to a member function log() on null in /var/www/t3coredev/typo3/sysext/core/Classes/Error/ErrorHandler.php on line 132

I am using a current master (TYPO3 9.2-dev).

I use a similar snippet in several TYPO3 8 instances:

typo3conf/AdditionalConfiguration.php:

$GLOBALS['TYPO3_CONF_VARS']['LOG']['writerConfiguration'] = [
    // configuration for ERROR level log entries
  \TYPO3\CMS\Core\Log\LogLevel::ERROR => [
      // add a FileWriter
    'TYPO3\\CMS\\Core\\Log\\Writer\\FileWriter' => [
       // configuration for the writer
      'logFile' => 'typo3temp/logs/typo3-error.log'
    ]
  ],

  \TYPO3\CMS\Core\Log\LogLevel::DEBUG => [
      // add a FileWriter
    'TYPO3\\CMS\\Core\\Log\\Writer\\FileWriter' => [
       // configuration for the writer
      'logFile' => 'typo3temp/logs/typo3-debug.log'
    ]
  ]    

];

ErrorHandler uses the new loggerAwareTrait functionality, so that should be fine.


Files

stacktrace.png (170 KB) stacktrace.png Sybille Peters, 2018-04-06 17:19

Related issues

Related to TYPO3 Core - Bug #84654: If problem with creation of logger, an Exception is thrown: A cache with identifier "assets" does not existClosed2018-04-07

Actions

Also available in: Atom PDF