Where do messages sent with syslog go when there is only a journal?

Hi,

where do messages sent with syslog go when there is only a journal?  When 
using Sys::Syslog, there don't seem to be any messages in the journal.

Does Sys::Syslog need to updated?
0
hw
5/15/2020 7:03:20 AM
perl.beginners 29382 articles. 4 followers. Follow

3 Replies
82 Views

Similar Articles

[PageSpeed] 41

Hopefully they don't make it systemd only. Some of us still use 
non-systemd systems.   :)

Leam

On 5/15/20 3:03 AM, hw wrote:
> Hi,
> 
> where do messages sent with syslog go when there is only a journal?  When
> using Sys::Syslog, there don't seem to be any messages in the journal.
> 
> Does Sys::Syslog need to updated?
> 
0
leamhall
5/18/2020 1:31:49 PM
--0000000000009c5b0805a602e660
Content-Type: text/plain; charset="UTF-8"

Huh, news to me:
https://www.loggly.com/ultimate-guide/using-journalctl/

cpan shows at least 5 modules for handling journald stuff, Log::Journald
shows
use Log::Journald;
use Sys::Syslog qw/:macros/;

# Easy.
journal_log(LOG_INFO, "Hello (1) from PID $$!");

# Send arbitrary fields, even binary data
Log::Journald::send(PRIORITY => LOG_INFO,
     MESSAGE => "Hello (2) from PID $$!",
     PERL_PACKAGE => __PACKAGE__,
     _YOLO => "SW\x00AG")
     or warn "Could not send log: $!";

# Raw
Log::Journald::sendv('PRIORITY=6',
     "MESSAGE=Hello (3) from PID $$!");

On Mon, May 18, 2020 at 6:41 AM hw <hw@adminart.net> wrote:

> Hi,
>
> where do messages sent with syslog go when there is only a journal?  When
> using Sys::Syslog, there don't seem to be any messages in the journal.
>
> Does Sys::Syslog need to updated?
>
> --
> To unsubscribe, e-mail: beginners-unsubscribe@perl.org
> For additional commands, e-mail: beginners-help@perl.org
> http://learn.perl.org/
>
>
>

-- 

a

Andy Bach,
afbach@gmail.com
608 658-1890 cell
608 261-5738 wk

--0000000000009c5b0805a602e660
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Huh, news to me:<div><a href=3D"https://www.loggly.com/ult=
imate-guide/using-journalctl/">https://www.loggly.com/ultimate-guide/using-=
journalctl/</a>=C2=A0</div><div><br></div><div>cpan shows at least 5 module=
s for handling journald stuff, Log::Journald shows</div>use Log::Journald;<=
br>use Sys::Syslog qw/:macros/;<br>=C2=A0<br># Easy.<br>journal_log(LOG_INF=
O, &quot;Hello (1) from PID $$!&quot;);<br>=C2=A0<br># Send arbitrary field=
s, even binary data<br>Log::Journald::send(PRIORITY =3D&gt; LOG_INFO,<br>=
=C2=A0 =C2=A0 =C2=A0MESSAGE =3D&gt; &quot;Hello (2) from PID $$!&quot;,<br>=
=C2=A0 =C2=A0 =C2=A0PERL_PACKAGE =3D&gt; __PACKAGE__,<br>=C2=A0 =C2=A0 =C2=
=A0_YOLO =3D&gt; &quot;SW\x00AG&quot;)<br>=C2=A0 =C2=A0 =C2=A0or warn &quot=
;Could not send log: $!&quot;;<br>=C2=A0<br># Raw<br>Log::Journald::sendv(&=
#39;PRIORITY=3D6&#39;,<br><div>=C2=A0 =C2=A0 =C2=A0&quot;MESSAGE=3DHello (3=
) from PID $$!&quot;);=C2=A0<br></div></div><br><div class=3D"gmail_quote">=
<div dir=3D"ltr" class=3D"gmail_attr">On Mon, May 18, 2020 at 6:41 AM hw &l=
t;<a href=3D"mailto:hw@adminart.net">hw@adminart.net</a>&gt; wrote:<br></di=
v><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;borde=
r-left:1px solid rgb(204,204,204);padding-left:1ex">Hi,<br>
<br>
where do messages sent with syslog go when there is only a journal?=C2=A0 W=
hen <br>
using Sys::Syslog, there don&#39;t seem to be any messages in the journal.<=
br>
<br>
Does Sys::Syslog need to updated?<br>
<br>
-- <br>
To unsubscribe, e-mail: <a href=3D"mailto:beginners-unsubscribe@perl.org" t=
arget=3D"_blank">beginners-unsubscribe@perl.org</a><br>
For additional commands, e-mail: <a href=3D"mailto:beginners-help@perl.org"=
 target=3D"_blank">beginners-help@perl.org</a><br>
<a href=3D"http://learn.perl.org/" rel=3D"noreferrer" target=3D"_blank">htt=
p://learn.perl.org/</a><br>
<br>
<br>
</blockquote></div><br clear=3D"all"><div><br></div>-- <br><div dir=3D"ltr"=
 class=3D"gmail_signature"><br>a<br><br>Andy Bach,<br><a href=3D"mailto:afb=
ach@gmail.com" target=3D"_blank">afbach@gmail.com</a><br>608 658-1890 cell<=
br>608 261-5738 wk</div>

--0000000000009c5b0805a602e660--
0
afbach
5/19/2020 4:37:41 PM
On Tuesday, May 19, 2020 6:37:41 PM CEST Andy Bach wrote:
> Huh, news to me:
> https://www.loggly.com/ultimate-guide/using-journalctl/
> 
> cpan shows at least 5 modules for handling journald stuff, Log::Journald
> shows
> use Log::Journald;
> use Sys::Syslog qw/:macros/;
> 
> # Easy.
> journal_log(LOG_INFO, "Hello (1) from PID $$!");
> 
> # Send arbitrary fields, even binary data
> Log::Journald::send(PRIORITY => LOG_INFO,
>      MESSAGE => "Hello (2) from PID $$!",
>      PERL_PACKAGE => __PACKAGE__,
>      _YOLO => "SW\x00AG")
>      or warn "Could not send log: $!";
> 
> # Raw
> Log::Journald::sendv('PRIORITY=6',
>      "MESSAGE=Hello (3) from PID $$!");
> 

Well ... I was looking at search results from dnf in Fedora 32 ...  I rather 
use packages from package management because otherwise, you need to keep track 
of updates yourself.  After a while, you have so much unincluded software on 
so many different machines that you loose track of things.

And what do you do when you need your program to be able to run on different 
distributions some of which use syslog, some of which have only a journal and 
some of which have both?

(The journal is a retarded idea and I hate it and never use it.  That doesn't 
mean I don't want the logging to go wrong.)
0
hw
5/28/2020 1:10:06 PM
Reply: