Re: [log4perl-devel] Bug: Wrapped logdie reports wrong file/line

2012-09-23 Thread Mike Schilli
On Tue, 18 Sep 2012, Bob Kleemann wrote:

 When might I expect 1.38 to be released to CPAN?

I've just pushed 1.38 to CPAN, should be on your mirror soon.

 Also, I note that you didn't change Log::Log4perl::get_logger to use
 caller_depth_offset.  I'm not sure if that was intentional or not.

Yeah, saw that, but the code is sufficiently different and the data
structure used for the wrappers is local to the package, so I think it's
good enough for now. If you have a patch to integrate it more tightly,
by all means, send it, I'll be happy to apply it :).

-- 
-- Mike

Mike Schilli
m...@perlmeister.com

 On Tue, Sep 18, 2012 at 12:28 AM, Mike Schilli m...@perlmeister.com
 wrote:
 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...@perlmeister.com

 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
 log4perl-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/log4perl-devel




--
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://ad.doubleclick.net/clk;258768047;13503038;j?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html
___
log4perl-devel mailing list
log4perl-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/log4perl-devel


Re: [log4perl-devel] Bug: Wrapped logdie reports wrong file/line

2012-09-18 Thread Mike Schilli
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...@perlmeister.com

 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
 log4perl-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/log4perl-devel


--
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
log4perl-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/log4perl-devel


Re: [log4perl-devel] Bug: Wrapped logdie reports wrong file/line

2012-09-18 Thread Bob Kleemann
Yes, it appears to work for me.  I've changed my caller_depth hack to
only operate on versions less than 1.38.  When might I expect 1.38 to
be released to CPAN?

Also, I note that you didn't change Log::Log4perl::get_logger to use
caller_depth_offset.  I'm not sure if that was intentional or not.

On Tue, Sep 18, 2012 at 12:28 AM, Mike Schilli m...@perlmeister.com wrote:
 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...@perlmeister.com

 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
 log4perl-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/log4perl-devel



--
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
log4perl-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/log4perl-devel