PacketFence - BTS - PacketFence
View Issue Details
0001416PacketFenceerror-handlingpublic2012-04-05 16:512015-02-13 15:42
obilodeau 
 
normalminorhave not tried
closedopen 
 
 
0001416: try::tiny and log4perl
when using try { } catch { }; blocks you don't see the current sub when using log4perl. instead you get __ANON__ as in: (pf::SNMP::__ANON__).

We should try to find a way around this.
No tags attached.
Issue History
2012-04-05 16:51obilodeauNew Issue
2012-04-05 16:52obilodeauTarget Version => +1
2012-04-07 10:57obilodeauNote Added: 0002637
2012-04-10 12:38obilodeauNote Added: 0002640
2012-04-10 12:39obilodeauNote Edited: 0002640
2012-04-10 12:49obilodeauNote Added: 0002641
2012-04-10 12:53obilodeauNote Edited: 0002641
2012-04-10 12:53obilodeauNote Edited: 0002641
2015-02-13 15:42lmunroNote Added: 0003836
2015-02-13 15:42lmunroStatusnew => closed

Notes
(0002637)
obilodeau   
2012-04-07 10:57   
I think I found a way: http://search.cpan.org/~mschilli/Log-Log4perl-1.36/lib/Log/Log4perl.pm#Using_Log::Log4perl_with_wrapper_functions_and_classes [^]
(0002640)
obilodeau   
2012-04-10 12:38   
(edited on: 2012-04-10 12:39)
first solution (to call something like: Log::Log4perl->wrapper_register("Try::Tiny");) didn't work on centos5 because bundled Log4perl is too old to support it over there.

packaged is 1.26 and feature introduced in 1.27 it seems :(

https://metacpan.org/source/MSCHILLI/Log-Log4perl-1.36/Changes [^]

(0002641)
obilodeau   
2012-04-10 12:49   
(edited on: 2012-04-10 12:53)
Poking the caller depth (local $Log::Log4perl::caller_depth = $Log::Log4perl::caller_depth + 1;) doesn't help either as all method called underneath no longer report the correct caller and I don't want to start intensively poking on caller_depth everywhere exception handling is used..

We'll probably have to submit a Log4perl version bump to the repoforge guys and then retry option 1.

(0003836)
lmunro   
2015-02-13 15:42   
These bugs have been sitting untouched since 2012.
Closing them and possibly reopening in github tracker where relevant.