Tcp-log plugin: carriage return is added to message


#1

I post the subject here, it’s a question but maybe a bug (or an undesired feature…).
A carriage return ("\r") is added to message in Kong tcp-log plugin.
But for lot’s of TCP listeners, like rsyslog, Fluentd, and certainly many others, separator is a simple line feed “\n”, not CRLF.
So in many cases the carriage return is part of the message, and produces an invalid JSON . I could add a parser to strip this character but I think there is no reason to have it (TCP plugin is not related to HTTP, separator must not be CRLF). And when I take a look into file-log plugin, there is no “\r” .
Note: For udp-log, separator is not needed.