- 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.