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:-
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