- Issue created by @smavri
- πΊπΈUnited States mfb San Francisco
There is a php config "syslog.filter" to determine if syslog splits the log message into multiple entries at new lines. By default, the logged string will be split at newline characters, and any non-printable characters will be escaped.
- π¨π¦Canada gapple
@mfb thanks for the info
Looks like this was changed behaviour in PHP 7.3, to default to splitting messages on newlines with the
no-ctrl
option (pre-7.3 behaviour can be configured with theraw
option)
https://www.php.net/manual/en/errorfunc.configuration.php#ini.syslog.filterCSP could detect the logging service and ini option to avoid pretty printing for syslog, but that seems like it could be better as an upstream option on the syslog service to strip newlines? AFAIK it's not uncommon for modules to send strings with newline to the logger, particularly with
pre
formatting?(as a sidenote, the goal is to remove logging violations from CSP module, and recommend the Reporting API β module with logging to the database by default once that functionality is available)
- πΊπΈUnited States mfb San Francisco
Yes π Sort out @backtrace_string logging by Syslog module Active is related; I'd agree that syslog module should somehow improve handling of multi-line log messages, especially since core can log those multi-line backtraces
- Status changed to Closed: outdated
5 months ago 9:44pm 4 July 2024 - π¨π¦Canada gapple
The sitelog report handler is deprecated in 1.x and removed from 2.x.
Reporting API module is the suggested replacement, but will also be changing from using the sitelog to storing reports in it's own database table in a future version.