Agent:...:Syslog(3pm)
β¨ Log::Agent::Driver::Syslog β the syslog logging driver for Log::Agent, bestie π
okay so real quick before we dive in: this is a page from the User Contributed Perl Documentation, it's Agent:...:Syslog(3pm), and it ships with perl v5.36.0 dated 2022-10-15. keep that in your back pocket, we'll circle back at the end π«Ά
πΈ NAME πΈ
Log::Agent::Driver::Syslog β the syslog logging driver for Log::Agent π
literally what it says on the tin. it's a Log::Agent driver and its whole personality is: syslog.
π SYNOPSIS π
here's the whole vibe in code, no cap:
use Log::Agent;
require Log::Agent::Driver::Syslog;
my $driver = Log::Agent::Driver::Syslog->make(
-prefix => prefix,
-facility => "user",
-showpid => 1,
-socktype => { port => 514, proto => "udp" },
-logopt => "ndelay",
);
logconfig(-driver => $driver);
that's it. that's the whole setup. make the driver, hand it to logconfig, go live β¨
π¦ DESCRIPTION π¦
The syslog logging driver delegates logxxx() operations to syslog() via the Sys::Syslog(3) interface. so all your logging girlies get passed along to syslog through Sys::Syslog(3), okay? that's the whole arrangement. iconic honestly.
The creation routine make() takes the following switches:
-facility=> facility β Tellsyslog()which facility to use (e.g."user","auth","daemon"). Unlike theSys::Syslog(3)interface, the facility is set once and for all: every logging message will use the same facility. so pick your facility and commit, babe, because there is no switching later π
If you wish to log something to "auth" for instance, then do so via Sys::Syslog directly: there is no guarantee that the application will configure its Log::Agent to use syslog anyway! like, fr fr, that's on the app, not on you.
-logopt=> syslog options β Specifies logging options, under the form of a string containing zero or more of the wordsndelay,consornowait. those three words. that's the whole menu π-prefix=> prefix β The prefix here is syslog's identification string. yeah it's not a cute little text prefix, it's the ident, okay? don't get it twisted π-showpid=> flag β Set to true to have the PID of the process logged. It is false by default. so if you want that PID in your logs you gotta ask for it, it's not coming for free π-socktype=> options β Specifies the logging socket to use (protocol, destination, etc.). The value given is not interpreted and passed as-is to the"setlogsock()"routine inSys::Syslog(3). so whatever you hand it, it hands straight over. no notes, no edits, no vibes check from this driver π
Please refer to Log::Agent::Channel::Syslog(3) for more information. go read that one, she's got the tea π
π CHANNELS π
All the channels go to syslog(), of course. like, obviously. every single one. that's the entire point bestie π
π AUTHOR π
Raphael Manfredi <Raphael_Manfredi@pobox.com> β the icon who wrote this π
π₯ SEE ALSO π₯
and that's the page, periodt π
this was Agent:...:Syslog(3pm) from the User Contributed Perl Documentation, living in perl v5.36.0 and dated 2022-10-15. go log something iconic, bestie πΈπ¦β¨
π¦ where this page comes from
- ubuntu noble: liblog-agent-perl 1.005-2 Β· Artistic-2.0
- ubuntu resolute: liblog-agent-perl 1.005-2 Β· Artistic-2.0
- ubuntu stonking: liblog-agent-perl 1.005-2 Β· Artistic-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms