Rsyslog & newlines

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Rsyslog & newlines

rsyslog-users mailing list
Hi,

I am working on a system where both systemd-journal & rsyslog(7.6.1) are
there. Systemd-journal is configured to forward logs to rsyslog routinely.
I have some logs which ends with newlines & that are directly sent to
journal using sd_journal_send() API's.

I see that although these logs are present in journal, it's not present in
/var/log/messages which is populated by rsyslog. Is rsyslog rejecting these
logs due to the ending newline?

Further, based on some search results on this topic, I tried adding the
following lines to rsyslog.conf, but this didn't help either.

# global directives
$EscapeControlCharactersOnReceive off
$EscapeControlCharactersCStyle off
$ActionFileDefaultTemplate RSYSLOG_SysklogdFileFormat
$SpaceLFOnReceive on
$DropTrailingLFOnReception off

Could you please let me know how can  I make rsyslog to accept these logs
ending with newline?

Thanks,
RV
_______________________________________________
rsyslog mailing list
http://lists.adiscon.net/mailman/listinfo/rsyslog
http://www.rsyslog.com/professional-services/
What's up with rsyslog? Follow https://twitter.com/rgerhards
NOTE WELL: This is a PUBLIC mailing list, posts are ARCHIVED by a myriad of sites beyond our control. PLEASE UNSUBSCRIBE and DO NOT POST if you DON'T LIKE THAT.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Rsyslog & newlines

Rainer Gerhards
I assume that journal does not forward them. A debug log might help to
validate this assumption. Rsyslog does not reject logs with newlines albeit
they usually cause huge problems in many subsystems and thus it is strongly
recommended to not use them.

Rainer

Sent from phone, thus brief.

Am 15.06.2017 05:00 schrieb "Renjith Vijayan via rsyslog" <
[hidden email]>:

Hi,

I am working on a system where both systemd-journal & rsyslog(7.6.1) are
there. Systemd-journal is configured to forward logs to rsyslog routinely.
I have some logs which ends with newlines & that are directly sent to
journal using sd_journal_send() API's.

I see that although these logs are present in journal, it's not present in
/var/log/messages which is populated by rsyslog. Is rsyslog rejecting these
logs due to the ending newline?

Further, based on some search results on this topic, I tried adding the
following lines to rsyslog.conf, but this didn't help either.

# global directives
$EscapeControlCharactersOnReceive off
$EscapeControlCharactersCStyle off
$ActionFileDefaultTemplate RSYSLOG_SysklogdFileFormat
$SpaceLFOnReceive on
$DropTrailingLFOnReception off

Could you please let me know how can  I make rsyslog to accept these logs
ending with newline?

Thanks,
RV
_______________________________________________
rsyslog mailing list
http://lists.adiscon.net/mailman/listinfo/rsyslog
http://www.rsyslog.com/professional-services/
What's up with rsyslog? Follow https://twitter.com/rgerhards
NOTE WELL: This is a PUBLIC mailing list, posts are ARCHIVED by a myriad of
sites beyond our control. PLEASE UNSUBSCRIBE and DO NOT POST if you DON'T
LIKE THAT.
_______________________________________________
rsyslog mailing list
http://lists.adiscon.net/mailman/listinfo/rsyslog
http://www.rsyslog.com/professional-services/
What's up with rsyslog? Follow https://twitter.com/rgerhards
NOTE WELL: This is a PUBLIC mailing list, posts are ARCHIVED by a myriad of sites beyond our control. PLEASE UNSUBSCRIBE and DO NOT POST if you DON'T LIKE THAT.
Loading...