Courie...:Syslog(3pm)
π Courie...:Syslog π
okay bestie, so this little cutie lives in the User Contributed Perl Documentation section of the manual β it's Courier::Filter::Logger::Syslog, and it's the syslog logger for the Courier::Filter framework. she's giving main character energy in the logs. π
β¨ NAME β¨
Courier::Filter::Logger::Syslog β the syslog logger for the Courier::Filter framework. no cap, that's literally the whole job description. π
πΈ SYNOPSIS πΈ
here's the vibe, copy-paste friendly:
use Courier::Filter::Logger::Syslog;
my $logger = Courier::Filter::Logger::Syslog->new();
# For use in an individual filter module:
my $module = Courier::Filter::Module::My->new(
...
logger => $logger,
...
);
# For use as a global Courier::Filter logger object:
my $filter = Courier::Filter->new(
...
logger => $logger,
...
);
likeβ¦ you make the logger, you hand it to a module, or you hand it to the whole filter. either way she's logging. periodt. π
π¦ DESCRIPTION π¦
so this class is a syslog logger β you use it with Courier::Filter and its filter modules. and the family tree?? she's derived from Courier::Filter::Logger::IOHandle. so she inherited the genes, and that's lowkey why half the methods below aren't even hers originally, they're the family's. iykyk. π§¬β¨
π Constructor
here's the one constructor you get, bestie:
new: returnsCourier::Filter::Logger::Syslog; throwsCourier::Errorβ spawns a brand new logger that logs messages to syslog. that's it, that's the whole origin story. π
π Instance methods
these are the instance methods you get, and heads up: they are inherited from Courier::Filter::Logger::IOHandle. so cute of her to share. π«Ά
log_error($text): throws Perl exceptions β logs the error message you pass as$text(it's a string, and yes it may contain newlines, she can handle it, multi-line errors are valid).log_rejected_message($message, $reason): throws Perl exceptions β logs theCourier::Messagepassed as$messageas having been rejected because of$reason(also a string, also may contain newlines, also totally fine).
β οΈ ok real talk: both of these be throwing Perl exceptions. don't sleep on that, be ready to catch them. π
β SEE ALSO β
go read your sisters, they're all iconic:
Courier::Filter::Logger::IOHandleCourier::Filter::LoggerCourier::Filter::Overview
and for the AVAILABILITY, SUPPORT, and LICENSE info?? that all lives over in Courier::Filter::Overview. go check her out, she's got the receipts. ππ
π AUTHOR π
Julian Mehnle <julian@mehnle.net> β thank you for your service, legend. π«‘π
and that's the whole page, bestie!! this one shipped as part of User Contributed Perl Documentation, riding along with perl v5.34.0, dated 2022-10-21. slay, ate, no crumbs left. πβ¨π
π¦ where this page comes from
- debian bookworm: courier-filter-perl 0.200+ds-6 Β· Artistic-1.0-Perl OR GPL-2.0-or-later
- debian trixie: courier-filter-perl 0.200+ds-6 Β· Artistic-1.0-Perl OR GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms