Only the first line of a multiline watchdog message is added to the log file for syslog-ng OSE 3.4. Multiline support will be available in version 3.5: http://www.balabit.com/network-security/syslog-ng/opensource-logging-sys...

It's probably best to strip newlines by default and provide an option to leave them in.

CommentFileSizeAuthor
#1 strip-newlines-2096037-1.patch679 byteskenneth.venken

Comments

kenneth.venken’s picture

StatusFileSize
new679 bytes

Attached is a simple solution.

damien_vancouver’s picture

Assigned: Unassigned » damien_vancouver

Hi Kenneth,

thanks for the patch! I will add the syslog_ng_strip_newlines option to the admin form settings and commit it to -dev for testing.

mpp’s picture

Issue summary: View changes

We encountered the same issue with syslog (core).

Syslog autodetects newline control characters and therefore splits the message by multiple lines. To prevent this behavior in PHP 7.3+ you can use undocumented (at this moment) ini setting:

<?php

ini_set('syslog.filter', 'raw');

# more info here: https://bugs.php.net/bug.php?id=77913