.\" 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::Driver::Default 3pm" .TH Agent::Driver::Default 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::Driver::Default \- default logging driver for Log::Agent .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 3 \& # Implicit use \& use Log::Agent; \& logconfig(\-prefix => "prefix"); # optional \& \& # Explicit use \& use Log::Agent; \& require Log::Agent::Driver::Default; \& \& my $driver = Log::Agent::Driver::Default\->make("prefix"); \& logconfig(\-driver => $driver); .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" The default logging driver remaps the \fIlogxxx()\fR operations to their default Perl counterpart. For instance, \fIlogerr()\fR will issue a \fIwarn()\fR and \fIlogwarn()\fR will call \fIwarn()\fR with a clear \*(L"\s-1WARNING: \*(R"\s0 emphasis (to distinguish between the two calls). .PP The only routine of interest here is the creation routine: .IP "make($prefix)" 4 .IX Item "make($prefix)" Create a Log::Agent::Driver::Default driver whose prefix string will be \&\f(CW$prefix\fR. When no prefix is configured, the first letter of each logged string will be uppercased. .SH "CHANNELS" .IX Header "CHANNELS" The \f(CW\*(C`error\*(C'\fR, \f(CW\*(C`output\*(C'\fR and \f(CW\*(C`debug\*(C'\fR channels all go to \s-1STDERR.\s0 .SH "BUGS" .IX Header "BUGS" If \fIlogdie()\fR is used within an \fIeval()\fR, the string you will get in $@ will be prefixed. It's not really a bug, simply that wrapping a code into \&\fIeval()\fR and parsing $@ is poor's man exception handling which shows its limit here: since the programmer using \fIlogdie()\fR cannot foresee which driver will be used, the returned string cannot be determined precisely. Morality: use \fIdie()\fR if you mean it, and document the string as an exception. .SH "AUTHOR" .IX Header "AUTHOR" Raphael Manfredi \fI\fR .SH "SEE ALSO" .IX Header "SEE ALSO" \&\fILog::Agent::Driver\fR\|(3), \fILog::Agent\fR\|(3).