http://qs321.pair.com?node_id=324272

set_uk has asked for the wisdom of the Perl Monks concerning the following question:

I have code wrapped within a try catch block. The logger instead of using the surrounding method/function name uses ANON when printing with the layout [%d][%p] (%C) %M %m%n. I guess this is because try is the closest control structure to the call. If this is the case and the stack is:-
package method_a try logger_call
I get logger messages package::anon. So if I have a number of try statements wrapping my code its hard to see where the log came from using the pattern layout.
Is there a solution to this?

Edited by BazB fixed square brackets