Skip to content

Escape forbidden characters in log messages, when syslog is used #12006

@sergepetrenko

Description

@sergepetrenko

We use \n to format log messages in some of our logs. Also some external modules, like http do the same:
https://github.com/tarantool/http/blob/a932a68d0c3e709eda75d5d624a966eb2a37897a/http/server.lua#L825-L828

When logging to syslog such messages violate the recommended syslog message format: it should only contain printable characters (ASCII/UTF-8) and should not contain any control chars: RFC5424.

Let's break up messages by \n chars. Not only in syslog, but in all logging modes (except json, probably?)

JIRA issue: https://jira.vk.team/browse/TNTP-4735

Metadata

Metadata

Assignees

Labels

featureA new functionality

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions