1Agent::Tag::Callback(3)User Contributed Perl DocumentatioAngent::Tag::Callback(3)
2
3
4

NAME

6       Log::Agent::Tag::Callback - a dynamic tag string
7

SYNOPSIS

9        require Log::Agent::Tag::Callback;
10        # Inherits from Log::Agent::Tag.
11
12        my $tag = Log::Agent::Tag::Callback->make(
13            -name      => "session id",
14            -callback  => Callback->new($obj, 'method', @args),
15            -postfix   => 1,
16            -separator => " -- ",
17        );
18

DESCRIPTION

20       This class represents a dynamic tag string, whose value is determined
21       by invoking a pre-determined callback, which is described by a
22       "Callback" object.
23
24       You need to make your application depend on the "Callback" module from
25       CPAN if you make use of this tagging feature, since "Log::Agent" does
26       not depend on it, on purpose (it does not really use it, it only offers
27       an interface to plug it in).  At least version 1.02 must be used.
28

CREATION ROUTINE PARAMETERS

30       The following parameters are defined, in alphabetical order:
31
32       "-callback" => "Callback" object
33           The callback to invoke to determine the value of the tag.  The call
34           is protected via a busy flag, in case there is an unwanted
35           recursion due to a call to one of the logging routines whilst
36           within the callback.
37
38           If the callback is busy, the tag emitted is:
39
40               callback "user" busy
41
42           assuming "user" is the name you supplied via "-name" for this tag.
43
44       "-name" => name
45           The name of this tag.  Used to flag a callback as busy in case
46           there is an unwanted recursion into the callback routine.
47
48       "-postfix" => flag
49           Whether tag should be placed after or before the log message.  By
50           default, it is prepended to the log message, i.e. this parameter is
51           false.
52
53       "-separator" => string
54           The separation string between the tag and the log message.  A
55           single space by default.
56

AUTHOR

58       Raphael Manfredi <Raphael_Manfredi@pobox.com>
59

SEE ALSO

61       Callback(3), Log::Agent::Tag(3), Log::Agent::Message(3).
62
63
64
65perl v5.32.1                      2021-02-15           Agent::Tag::Callback(3)
Impressum