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.)

-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to