|
|
| Perl-Sensitive Sunglasses | |
| PerlMonks |
Re: Reference sub nameby martin (Pilgrim) |
| on Jul 27, 2008 at 10:10 UTC ( #700349=note: print w/ replies, xml ) | Need Help?? |
|
The caller function will let you do that. Example:
Personally, when I need additional log information depending on context, I prefer to use explicit parameters for the logging function. This way, I have more control on the logging protocol, and the individual context tags at each logger call make it easy to map log messages back to the related pieces of code without exposing program internals in the logs. I do not depend on a one-to-one relationship between subroutine names and things worth while to log, either. Example:
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||||