syslog-ng

What is the meaning of 'sanitize-utf8' in syslog-ng configuration flags


The documentation of syslog-ng says that this flag converts non-utf8 input to a valid 'escaped form'.
Does 'escaped form' mean that the rest of the part that is not utf8 is removed or does it mean that the part that is not utf8 is converted to utf8?
And if you add this flag to syslog-ng.conf, syslog-ng will not run. enter image description here
The error code is as follows. enter image description here

Why does the execution of syslog-ng fail?


Solution

  • In case the received message contains invalid UTF-8 sequences, the sanitize-utf8 flag replaces them with a binary-escaped format, for example, \xAB.

    The sanitize-utf8 flag is available starting from syslog-ng v3.7.1.