[systemd-devel] Splitting large message written to stdout, explanation?

Stephen Hemminger stephen at networkplumber.org
Sun May 21 16:26:03 UTC 2023


On Sun, 21 May 2023 15:32:14 +0530
Virendra Negi <virendra.negi at sugarboxnetworks.com> wrote:

> It's been over a week I have been chasing this
> https://github.com/rsyslog/rsyslog/issues/5137
> 
> I was unsure how to ensure that the systemd (since I was getting nowhere
> with rsyslog)  split the message instead of the application program doing
> this.
> 
> Apparently, today I just removed the following section from the `
> *target.service*` file
> 
> StandardOutput=syslog
> StandardError=syslog
> SyslogIdentifier=sbagent
> 
> And set the MaxMessageSize to 64K and what I saw was the 1.5MB long message
> that was truncating earlier went through this time without truncation and a
> split happened the way I wanted it to be.
> 
> I'm unsure what caused it hence for the sake of understanding it. I'm
> writing this. Can someone put some light on it as to why this happened now
> and not earlier.
> 
> Thanks


Syslog was never really intended for large size messages. It is not Windows event log.
If you are sending large complex things then using dbus to communicate directly
is a better option.


More information about the systemd-devel mailing list