<div dir="ltr">Thanks, Lennart.</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, May 22, 2023 at 4:28 PM Lennart Poettering <<a href="mailto:lennart@poettering.net">lennart@poettering.net</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Mo, 22.05.23 15:58, Virendra Negi (<a href="mailto:virendra.negi@sugarboxnetworks.com" target="_blank">virendra.negi@sugarboxnetworks.com</a>) wrote:<br>
<br>
> I'm not sure how Systemd was handling this, but my assumption is that<br>
> systemd redirects STDOUT , STDERR to /*dev/log *and then systemd would<br>
> pick that up and write to the respective file based. Given I found no help<br>
> with rsyslog to deal with the large size log message (which are few in<br>
> number) I looked at the journald conf.<br>
<br>
"Standard{Output|Error}=syslog" is legacy. It's identical to<br>
"Standard{Output|Error}=journal", and that's the default anyway. Hence<br>
these two lines are entirely unnecessary, you can drop them without<br>
change in behaviour<br>
<br>
The journal daemon picks up the logs from stdout/stderr of various<br>
services, from syslog, form the native journal protocol and writes it<br>
to the journal files.<br>
<br>
I have no idea about rsyslog and your distro, but secondary logging<br>
services have two way to get ahold of the log data once journald<br>
picked it up: they can listen on some AF_UNIX that systemd forwards<br>
all mentioned log data. This is mostly a compat feature since it only<br>
covers log data "as it happens", and that means not early boot/late<br>
shutdown stuff. It also doesn't do structured loggic. The other way is<br>
to simply read the data from journal files as the are updated, using<br>
the files as a "live" transport, with the nice functionality that<br>
secondary logging services can easily catch up with what happened<br>
while they weren't running. And you get full structured data. I know<br>
that RHEL configures rsyslog that way, but I think rsyslog upstream<br>
used to be hostile to such an approach, so no idea, if that ever was<br>
merged upstream.<br>
<br>
> As mentioned you can use the _LINE_BREAK= field to reassemble the<br>
> > lines. But seriously, if you are logging megabytes of data in single<br>
> > log messages you are doing things wrong. Rivisit what you are doing<br>
> > there, you are trying to hammer a square log message into a round log<br>
> > transport. Bad idea.<br>
><br>
> @Lennart How? JFI, this is what the split message of a large log message<br>
> looks like.<br>
<br>
Well, I think rsyslog has no idea about the journal's structured<br>
logging, because it lives in its own world. It won't see the<br>
_LINE_BREAK= structured logging. Hence you cannot reasonably<br>
reassamble I guess, the info is simply lost once rsyslog takes over.<br>
<br>
Lennart<br>
<br>
--<br>
Lennart Poettering, Berlin<br>
</blockquote></div>
<br>
<div><font style="color:rgb(34,34,34);font-family:"trebuchet ms",sans-serif"><font size="3"><img src="https://sugarbox.sgp1.cdn.digitaloceanspaces.com/logo-signature-small.jpg"><br></font><a href="https://www.facebook.com/SugarBoxNetworks/" style="font-size:1.3em" target="_blank"><img src="https://sugarbox.sgp1.cdn.digitaloceanspaces.com/facebook-small.png" style="font-family:Arial,Helvetica,sans-serif;font-size:1.3em"></a><span style="font-size:1.3em"> </span></font><a href="https://www.instagram.com/sugarboxnetworks/" style="font-size:1.3em" target="_blank"><img src="https://sugarbox.sgp1.cdn.digitaloceanspaces.com/instagram-small.png" style="font-size:1.3em"></a><span style="font-size:1.3em"> </span><a href="https://in.linkedin.com/company/margo-networks-pvt.-ltd." style="font-size:1.3em" target="_blank"><img src="https://sugarbox.sgp1.cdn.digitaloceanspaces.com/linkedin-small.png" style="font-size:1.3em"></a></div><div><div style="font-size:small;color:rgb(34,34,34);background-color:rgb(255,255,255);font-family:"trebuchet ms",sans-serif"><br></div></div>
<br>
<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><i><b>Disclaimer</b>: This e-mail and any documents, files, or previous e-mail messages appended or attached to it may contain confidential and/or privileged information. If you are not the intended recipient (or have received this email in error) please notify the sender immediately and delete this e-mail. Any unauthorized copying, disclosure or distribution of the material in this email is strictly prohibited & unlawful. The recipient acknowledges that Margo Networks Private Limited (SugarBox) may be unable to exercise control or ensure or guarantee the integrity of the text of the email message and the text is not warranted as to completeness and accuracy. Before opening and accessing the attachment, if any, please check and scan for virus</i></div></div></div></div><br>