Review main Abandoned

69524[TASK] Remove the legacy logger from the Exception handlers

crell CR 0 V 0 Normal +0 −68 updated 02/04/23, 11:22

Commit message

They're already using the new PSR-3 logger, so it's redundant to also
write to the table directly.

Review

  • Code review CR 0
  • Verified V 0

Issues 1

Files 1

Review log 811

  1. crell uploaded patch set 1 06/18/21, 20:22

  2. core-ci voted on patch set 1 V -1 06/18/21, 20:24 Core CI is not happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/12595

  3. crell uploaded patch set 2 06/18/21, 21:11

  4. core-ci voted on patch set 2 V +1 06/18/21, 21:21 Core CI is happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/12596

  5. Sybille Peters commented on patch set 2 CR -1 06/22/21, 06:24

    I think it is great that you are straightening out the logging. I also saw the other discussions - and I find this direct writing to sys_log very awkward, since it is outside of the logging framework and there is no way to configure it (not even with the existing and documented configuration). However ... 1) It seems to me, this might be a breaking change. Exceptions could be extending from the AbstractExceptionHandler and use writeLog(). (The class and function are not @public API but not @internal either but I must admit I am a little fuzzy what the criteria for officially public API are). Usually, when we remove stuff, we trigger a deprecation and then do the breaking changes at the beginning of the next release (in the first release cycle with "breaking changes"). 2) site maintainers might be relying on exceptions getting logged to sys_log. There is a dedicated "Log" module in the backend where you can view the log messages. Even if this feels flat out wrong now, it might be even more wrong to change it outside of official "breaking changes" release phase. 3) Probably good to add a changelog (for removal of writeLog()): https://docs.typo3.org/c/typo3/cms-core/master/en-us/Changelog/Howto.html 4) You might also want to get rid of the writeLog() in the ErrorHandler class. But that could probably be a separate patch. So IMHO, the question is if this is a "breaking change" and / or ok to do at this point. Disclaimer: am not in core team.
  6. Benni Mack wrote 11/29/21, 10:05

    Change destination moved from master to main
  7. Benni Mack updated the commit message in patch set 3 11/29/21, 13:22

  8. core-ci voted on patch set 3 V +1 11/29/21, 13:51 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/20012

  9. Benni Mack commented on patch set 3 12/10/21, 10:30

    Reply

    Some insights. 1. Triggering a deprecation here with trigger_error() seems odd as this would bubble AGAIN in the Exception Handler if configured. 2. Regarding "public API". If it's not marked with @internal it's public, so we don't use any other doc annotations such as "@api" or "@public" anymore. We use this strategy since TYPO3 v9.5 LTS. 3. There are cases which are breaking and we can't deprecate beforehand, so in this case, making this change for the main branch only and adding a Breaking RST is fine. I'd love to see a RST on how to configure a TYPO3 system so exceptions are logged to sys_log again (as this is now removed).
  10. Christian Kuhn commented on patch set 3 02/04/23, 11:22

    Hey. This is stuck for a while and currently nobody is working on the logging topic. Since this is a pretty simple remove-only patch, I hope it's ok to abandon here for now and maybe pick up again when the topic gains traction again.
  11. Christian Kuhn abandoned the change 02/04/23, 11:22