|
From: Mike S. <m...@pe...> - 2012-09-18 07:49:02
|
On Mon, 17 Sep 2012, Bob Kleemann wrote:
> It prints the write file/line on the logged message (-e:1), but not on
> the die message (perllib/WSL/... line 174).
Hi Bob,
thanks for reporting this issue, I've provided a fix here:
https://github.com/mschilli/log4perl/commit/e258163ef2c219e082419e6158ad6fa96eeebc5d
You can download the updated tarball from:
https://github.com/mschilli/log4perl/tarball/1.38logdie
Would be great if you could give it a whirl, let me know if it's working
for you.
--
-- Mike
Mike Schilli
m...@pe...
> around in my wrapping code by incrementing
> $Log::Log4perl::caller_depth, but this feels like a hack, as I've
> already registered the package as a wrapper with
> Log::Log4perl->wrapper_register( __PACKAGE__ );. I believe the
> correct fix is to change the Log::Log4perl::Logger::callerline method
> to use the %WRAPPERS_REGISTERED hash, similar to
> Log::Log4perl::get_logger:
>
> my $level = $Log::Log4perl::caller_depth;
> my ($pack, $file, $line);
> do { ($pack, $file, $line) = caller(++$level)
> } while ( exists $Log::Log4perl::WRAPPERS_REGISTERED{ $pack } );
>
> Although if you're replicating code, you should be wrapping the
> duplication in a function somewhere and just calling that.
>
> I would appreciate it if you could let me know if/when the issue will
> be addressed.
>
> -- Bob
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> log4perl-devel mailing list
> log...@li...
> https://lists.sourceforge.net/lists/listinfo/log4perl-devel
>
|