Bug #87820

Logger not instanciated in cache backend

Added by Marco Dinnbier over 2 years ago. Updated almost 2 years ago.

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

100%

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

Description

The function setLogger is never called in cache backend.
The cache backend is instanciated via 'new' and not via GeneralUtility::makeInstance in TYPO3\CMS\Core\Cache\CacheManager::createCache.

This leads to an error, when the logger in cache backend class is needed: 'Core: Exception handler (WEB): Uncaught TYPO3 Exception: Call to a member function alert() on null ...'


Related issues

Related to TYPO3 Core - Bug #88938: wrong class statement for logger initializationClosedAnja Leichsenring2019-08-08

Actions
Has duplicate TYPO3 Core - Bug #88775: logger in ApcuBackend is not instantiatedClosed2019-07-16

Actions
#1

Updated by Benni Mack over 2 years ago

Hmm, this is a tricky one.

Basically, because AbstractBackend is a LoggerAwareInterface, basically all caches that are used until ext_localconf.phps are loaded (cache_core, assets) will not have their final Logger Configuration set. We can add this manually, which would make sense, but this might result in more side-effects...

But the solution for this patch would be: createCache() checks for the LoggerAwareInterface and puts in the code, like makeInstance does it.

#2

Updated by Susanne Moog over 2 years ago

  • Category set to Logging
#3

Updated by Daniel Windloff about 2 years ago

  • Has duplicate Bug #88775: logger in ApcuBackend is not instantiated added
#4

Updated by Stephan Ederer about 2 years ago

This bug is a showstopper.
We've got redundant server nodes. If one node is down the website is still online.
But if the Redis-Server is down (for maintenance e.g.), the webside is down too.

#5

Updated by Susanne Moog about 2 years ago

  • Target version set to next-patchlevel
#6

Updated by Gerrit Code Review about 2 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61472

#7

Updated by Gerrit Code Review about 2 years ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61472

#8

Updated by Gerrit Code Review about 2 years ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61472

#9

Updated by Gerrit Code Review about 2 years ago

Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61472

#10

Updated by Gerrit Code Review about 2 years ago

Patch set 1 for branch 9.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61460

#11

Updated by Anja Leichsenring about 2 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
#12

Updated by Anja Leichsenring about 2 years ago

  • Related to Bug #88938: wrong class statement for logger initialization added
#13

Updated by Benni Mack almost 2 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF