Review 14.3 Merged

97244[BUGFIX] Respect error code when determining sys_log level

Oli Bartsch CR +2 V +2 Normal +73 −4 updated 10/30/26, 21:52

Commit message

The log level written to sys_log was derived from the log type only,
so a failed SQL query (type DB, error SYSTEM_ERROR) ended up as "info".

Type::toLevel() now also takes the error code into account. The error
code can only raise the level of the type, never lower it:

- MESSAGE         -> level of the type (unchanged)
- USER_ERROR      -> warning
- SYSTEM_ERROR    -> error
- SECURITY_NOTICE -> notice
- WARNING         -> warning

USER_ERROR is mapped to "warning" on purpose: it is used at many call
sites for user-caused refusals such as missing permissions, which is
documented as "warning (user problem)". Mapping it to "error" would
flood the "at least error" filter and monitoring setups with routine
permission denials.

Review

  • Code review CR +2 Done
    • Oli Bartsch +2
  • Verified V +2 Done
    • Oli Bartsch +2
    • core-ci +1 CI

Issues 1

Files 4

Review log 34

  1. Oli Bartsch commented on patch set 1 10/30/26, 21:26

    Cherry Picked from branch main.
  2. core-ci voted on patch set 1 V +1 10/30/26, 21:40 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/112914

  3. Oli Bartsch voted on patch set 1 CR +2 V +2 10/30/26, 21:52

  4. Oli Bartsch merged patch set 2 10/30/26, 21:52