logger unnecessarily splits messages sent via stdin into 1024 byte chunks
Issue
-
It seems that in every version of RHEL, the
logger
command splits messages sent via stdin into 1024-byte (or 1 KiB) chunks. In contrast, when input message is passed as a cmdline argument (e.g.,logger $(perl -E 'say "a" x 2000)
) logger does not split or truncate the message. -
I have configured Apache httpd to send logs to syslog with directives like the following:
CustomLog "|/bin/logger -t httpd -p local0.info" common ErrorLog "|/bin/logger -t httpd -p local0.err"
However, on the syslog side, messages greater than 1000 characters get split into multiple log entries.
-
I followed the directions in How can an application in RHEL7 write logs directly to local/remote rsyslog, bypassing journald? but logger appears to be splitting long messages on a 1k limit.
Environment
- Red Hat Enterprise Linux 7
- Red Hat Enterprise Linux 6
- Red Hat Enterprise Linux 5
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.