NAME

Log::Caller

SYNOPSIS

log_debug "scanning new data...";

[debug] scanning new data...  at t/00compile.t line 6.

log_warn "client %d not found!",$id;

[warn] client 123 not found! at t/00compile.t line 8.

DESCRIPTION

Log Caller is made for those who like the output from warn() but want something with log levels for ease of parsing and filtering.
log_$level EXPR LIST

Take EXPR as a sprintf pattern and evaluate it with LIST if defined then print it to STDERR or the provided filehandle.

EXPORT

Configuration

use Log::Caller ":all";

use Log::Caller qw[ log_debug log_warn ];

use Log::Caller ":all" => { prefix => ' <prefixin>' };

my $fh;
BEGIN { open( $fh, ">", "outs.txt" ) or die "$@ $!" };
use Log::Caller (
   "log_debug" => { prefix => 'prefix1>', fh => $fh },
   "log_warn" => { prefix => 'prefixDos::' },
   );
       

The following functions are available for export:

log_debug, log_info, log_error, log_warn, log_fatal,

The :all tag is also available for importing all.

SEE ALSO

Log::Fu - A configurable logger with caller context among other features.

Log::Log4perl - Also has callstack support, but waaaay more intense.

AUTHOR

sam@socialflow.com, sponsored by SocialFlow, Inc.

COPYRIGHT & LICENSE

Copyright 2012, Sam Kaufman skaufman@cpan.org

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.