Add LF to the end of syslog message when sending over TCP

This commit is contained in:
Alfredo Cardigliano 2020-11-10 10:08:29 +01:00
parent 841b476f59
commit 683a4a727b

View file

@ -110,7 +110,7 @@ function syslog.sendMessage(settings, notif, severity, syslog_format)
msg = "<"..prio..">"..date.." "..tag.."["..pid.."]: "..msg
if settings.protocol == 'tcp' then
ntop.send_tcp_data(settings.host, settings.port, msg, 1 --[[ timeout (msec) --]] )
ntop.send_tcp_data(settings.host, settings.port, msg.."\n", 1 --[[ timeout (msec) --]] )
else
ntop.send_udp_data(settings.host, settings.port, msg)
end