.\" Automatically generated by Pod::Man 2.28 (Pod::Simple 3.29) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is turned on, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{ . if \nF \{ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Agent::Tag::Caller 3pm" .TH Agent::Tag::Caller 3pm "2016-09-17" "perl v5.22.2" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" Log::Agent::Tag::Caller \- formats caller information .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 2 \& Not intended to be used directly \& Inherits from Log::Agent::Tag. .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" This class handles caller information for Log::Agent services and is not meant to be used directly. .PP This manpage therefore only documents the creation routine parameters that can be specified at the Log::Agent level via the \f(CW\*(C`\-caller\*(C'\fR switch in the \fIlogconfig()\fR routine. .SH "CALLER INFORMATION ENTITIES" .IX Header "CALLER INFORMATION ENTITIES" This class knows about four entities: \fIpackage\fR, \fIfilename\fR, \fIline\fR and \fIsubroutine\fR, which are to be understood within the context of the Log::Agent routine being called (e.g. a \fIlogwarn()\fR routine), namely: .IP "package" 4 .IX Item "package" This is the package name where the call to the \fIlogwarn()\fR routine was made. It can be specified as \*(L"pack\*(R" for short, or spelled out completely. .IP "filename" 4 .IX Item "filename" This is the file where the call to the \fIlogwarn()\fR routine was made. It can be specified as \*(L"file\*(R" for short, or spelled out completely. .IP "line" 4 .IX Item "line" This is the line number where the call to the \fIlogwarn()\fR routine was made, in file \fIfilename\fR. The name is short enough to be spelled out completely. .IP "subroutine" 4 .IX Item "subroutine" This is the subroutine where the call to the \fIlogwarn()\fR routine was made. If the call is made outside a subroutine, this will be empty. The name is long enough to warrant the \*(L"sub\*(R" abbreviation if you don't wish to spell it out fully. .SH "CREATION ROUTINE PARAMETERS" .IX Header "CREATION ROUTINE PARAMETERS" The purpose of those parameters is to define how caller information entities (as defined by the previous section) will be formatted within the log message. .ie n .IP """\-display"" => \fIstring\fR" 4 .el .IP "\f(CW\-display\fR => \fIstring\fR" 4 .IX Item "-display => string" Specifies a string with minimal variable substitution: only the caller information entities specified above, or their abbreviation, will be interpolated. For instance: .Sp .Vb 1 \& \-display => \*(Aq($package::$sub/$line)\*(Aq .Ve .Sp Don't forget to use simple quotes to avoid having Perl interpolate those as variables, or escape their leading \f(CW\*(C`$\*(C'\fR sign otherwise. Using this convention was deemed to more readable (and natural in Perl) than \s-1SGML\s0 entities such as \*(L"&pack;\*(R". .Sp Using this switch supersedes the \f(CW\*(C`\-info\*(C'\fR and \f(CW\*(C`\-format\*(C'\fR switches. .ie n .IP """\-format"" => \fIprintf format\fR" 4 .el .IP "\f(CW\-format\fR => \fIprintf format\fR" 4 .IX Item "-format => printf format" Formatting instructions for the caller information entities listed by the \f(CW\*(C`\-info\*(C'\fR switch. For instance: .Sp .Vb 1 \& \-format => "%s:%4d" .Ve .Sp if you have specified two entities in \f(CW\*(C`\-info\*(C'\fR. .Sp The special formatting macro \f(CW%a\fR stands for all the entities specified by \f(CW\*(C`\-info\*(C'\fR and is rendered by a string where values are separated by \*(L":\*(R". .ie n .IP """\-info"" => \fI""space separated list of parameters""\fR" 4 .el .IP "\f(CW\-info\fR => \fI``space separated list of parameters''\fR" 4 .IX Item "-info => space separated list of parameters" Specifies a list of caller information entities that are to be formated using the \f(CW\*(C`\-format\*(C'\fR specification. For instance: .Sp .Vb 1 \& \-info => "pack sub line" .Ve .Sp would only report those three entites. .ie n .IP """\-postfix"" => \fIflag\fR" 4 .el .IP "\f(CW\-postfix\fR => \fIflag\fR" 4 .IX Item "-postfix => flag" Whether the string resulting from the formatting of the caller information entities should be appended to the regular log message or not (i.e. prepended, which is the default). .ie n .IP """\-separator"" => \fIstring\fR" 4 .el .IP "\f(CW\-separator\fR => \fIstring\fR" 4 .IX Item "-separator => string" The separation string between the tag and the log message. A single space by default. .SH "AUTHORS" .IX Header "AUTHORS" Raphael Manfredi created the module, it is currently maintained by Mark Rogaski . .PP Thanks to Jeff Boes for uncovering wackiness in \fIcaller()\fR. .SH "LICENSE" .IX Header "LICENSE" Copyright (C) 1999 Raphael Manfredi. Copyright (C) 2002 Mark Rogaski; all rights reserved. .PP See \fILog::Agent\fR\|(3) or the \s-1README\s0 file included with the distribution for license information. .SH "SEE ALSO" .IX Header "SEE ALSO" \&\fILog::Agent\fR\|(3), \fILog::Agent::Message\fR\|(3).