develooper Front page | perl.beginners | Postings from May 2020

Re: Where do messages sent with syslog go when there is only ajournal?

Thread Previous | Thread Next
From:
Andy Bach
Date:
May 19, 2020 16:37
Subject:
Re: Where do messages sent with syslog go when there is only ajournal?
Message ID:
CACV6rW+Kge86tyqjjwtqf6U1au7N0VK3NAdkycBG2u++wuTd1A@mail.gmail.com
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

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About