Bug #84646
Updated by Sybille Peters over 6 years ago
In the BE the following error is displayed if the logging api is enabled: <pre><code class="text"> 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 </code></pre> I am using a current master (TYPO3 9.2-dev). I use a similar snippet in several TYPO3 8 instances: typo3conf/AdditionalConfiguration.php: <pre><code class="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' ] ] ]; ); </code></pre> ErrorHandler uses the new "loggerAwareTrait":https://docs.typo3.org/typo3cms/extensions/core/Changelog/9.0/Feature-82441-InjectLoggerWhenCreatingObjects.html functionality, so that should be fine.