Project

General

Profile

Actions

Epic #94356

closed

Embrace PSR-3

Added by Christian Kuhn about 3 years ago. Updated over 1 year ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2021-06-11
Due date:
% Done:

100%

Estimated time:
(Total: 0.00 h)
Sprint Focus:

Description

General:
  • Part 1: Get rid of everything that does not use psr-3 logging currently.
  • Part 2 & 3: Refine our logging implementation and configuration, adapt ext:belog.

This epic is about Part 1 for now. Main goal: writing to sys_log only via DatabaseWriter, all other implementations should fall (deprecated), no manual querying of sys_log anymore like in DataHandler (anywhere else?), except ext:belog. Probably keep ext:belog and sys_log schema as is, for now.

  • (#94315): Move to proper PSR-3 logging format.
  • Transition all places that write to sys_log to use PSR-3 logger instead, configure DatabaseWriter for them
    • DataHandler: This one uses be_user->writelog() via log() and newlog(). Look into these calls, use logger instead and also have a look at classes that may call DataHandler->log() and DataHandler->newlog() (they're public and I'd bet things like RelationHandler may use that). Configure DataHandler logger to use DatabaseWriter, and adapt DatabaseWriter to de-normalize towards the existing fields log() and newlog() wrote to.
    • DataHandler: Consider additionally configuring memoryWriter to gather log rows of one request. See printLogErrorMessages() which currently queries sys_log to turn errors into flash messages if in web context. This could be fetched from MemoryWriter instead?
    • Adapt Other places that call be_user->writelog
    • Deprecate be_user->writelog
    • Configure DatabaseWriter for ExceptionHandler and drop the manual insert query to sys_log in AbstractExceptionHandler. Keep an eye on bootstrap: What happens if a parse error happens in early bootstrap due to a broken (3rd party) extension? Is logging properly initialized and it's still logged to sys_log in this case?
    • See if other places insert / select sys_log, adapt, eventually deprecate them.

Subtasks 10 (0 open10 closed)

Bug #94315: Use PSR-3 interpolationClosed2021-06-11

Actions
Task #94352: Tidy up logging frameworkClosed2021-06-15

Actions
Task #94369: Use PSR-3 logger exclusively in ErrorHandlerRejected2021-06-17

Actions
Bug #94382: Allow all Throwables in log formattingClosed2021-06-18

Actions
Task #94383: Remove sys_log writes from ExceptionHandlerRejected2021-06-18

Actions
Task #94395: Remove sys_log writes from PasswordResetRejected2021-06-21

Actions
Task #94433: Add channel column to sys_log tableClosedLarry Garfield2021-06-29

Actions
Task #94439: Switch belog to use channelsClosedLarry Garfield2021-06-29

Actions
Feature #94600: Use Monolog for injected logging servicesRejectedLarry Garfield2021-07-20

Actions
Task #97145: Migrate sys_log serialized data to JSON contentClosedBenni Mack2022-03-08

Actions

Related issues 5 (0 open5 closed)

Related to TYPO3 Core - Bug #94043: Incorrect usage of PSR-3 loggerClosed2021-05-03

Actions
Related to TYPO3 Core - Feature #82483: Introduce FingersCrossed LogWriterClosed2017-09-14

Actions
Related to TYPO3 Core - Feature #85506: Integrate monolog as logging frameworkRejectedBenjamin Franzke2018-07-07

Actions
Related to TYPO3 Core - Task #94344: Move PSR-3 logger to its own tableClosed2021-06-14

Actions
Related to TYPO3 Core - Bug #103799: Scheduler task exception error message misses exception messageResolved2024-05-07

Actions
Actions #1

Updated by Christian Kuhn about 3 years ago

  • Description updated (diff)
Actions #2

Updated by Christian Kuhn about 3 years ago

  • Description updated (diff)
Actions #3

Updated by Larry Garfield about 3 years ago

  • Related to Bug #94043: Incorrect usage of PSR-3 logger added
Actions #4

Updated by Christian Kuhn about 3 years ago

Actions #5

Updated by Christian Kuhn about 3 years ago

  • Related to Feature #85506: Integrate monolog as logging framework added
Actions #6

Updated by Christian Kuhn about 3 years ago

  • Related to Task #94344: Move PSR-3 logger to its own table added
Actions #7

Updated by Christian Kuhn about 3 years ago

  • Description updated (diff)
Actions #8

Updated by Christian Kuhn over 1 year ago

  • Status changed from New to Closed

The topic is stuck again and needs another restart. I'm closing here for the time being.

Actions #9

Updated by Christian Weiske about 2 months ago

  • Related to Bug #103799: Scheduler task exception error message misses exception message added
Actions

Also available in: Atom PDF