Agent:...llback(3pm)
π NAME π
Log::Agent::Tag::Callback β a dynamic tag string, bestie. it's giving custom, on-the-fly tag realness β¨
so this is the perl v5.36.0 manpage, dated 2022-10-15, from the Agent:...llback(3pm) family of docs π
β¨ SYNOPSIS β¨
require Log::Agent::Tag::Callback;
# Inherits from Log::Agent::Tag.
my $tag = Log::Agent::Tag::Callback->make(
-name => "session id",
-callback => Callback->new($obj, 'method', @args),
-postfix => 1,
-separator => " -- ",
);
π¦ DESCRIPTION π¦
okay so picture this: this class is a tag string that's dynamic β its whole value comes from calling a callback you set up ahead of time. and that callback is described by a Callback object. no cap, that's the entire vibe π
here's the tea though: if you're gonna use this tagging feature, you need to make your application depend on the Callback module from CPAN. Log::Agent does not depend on it β and that's on purpose, fr fr (it doesn't actually use it, it just gives you an interface to plug it in). and you gotta use at least version 1.02, periodt.
πΈ CREATION ROUTINE PARAMETERS πΈ
these are all the params, listed in alphabetical order (yes bestie, alphabetical, we love a tidy queen π):
-callback=>Callbackobject β the callback that gets invoked to determine the tag's value. the call is protected by a busy flag, just in case there's some unwanted recursion from calling one of the logging routines while you're inside the callback. and if the callback is busy, the tag it emits is:
callback "user" busy
where "user" is the name you handed over via -name for this tag π
- *
-name=> *name β the name of this tag. it's what flags a callback as busy when there's an unwanted recursion back into the callback routine. so basically it's the tag's little ID badge πͺͺ -postfix=> flag β whether the tag goes after the log message or before it. by default it's **prepended to the log message, meaning this parameter is false. (so if you want it out back where it belongs, set this, bestie π)- *
-separator=> *string β the string that separates the tag from the log message. default is a single space. π«
π AUTHOR π
Raphael Manfredi <Raphael_Manfredi@pobox.com> β iconic behavior, honestly π
π«Ά SEE ALSO π«Ά
Callback(3), Log::Agent::Tag(3), Log::Agent::Message(3).
and that's a wrap, bestie π this was Agent:...llback(3pm) from perl v5.36.0, dated 2022-10-15 β go forth and tag dynamically, you absolute main character π
π¦ 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