From: Mike S. <m...@pe...> - 2006-08-23 07:31:28
|
On Mon, 21 Aug 2006, Lev Lvovsky wrote: > I'm specifically interested in - when entering/leaving a function, in > the past, I've used $logger->debug('begin') to denote a function > call, and the corresponding 'end' to signal its exit. This can lead > to a lot of output, but I've found it useful for creating a call > stack in the logs - in the case of error, I set the log level higher > upon exit: $logger->warn('end'), that way, even if I have the > threshold higher than debug, I see the important stuff related to > this. Is there an easier way to do this? Looks good to me. If you're logging subroutine entries and exits extensively, you might wanna look at wrappers like http://search.cpan.org/~jdporter/Hook-WrapSub-0.03/lib/Hook/WrapSub.pm -- Mike Mike Schilli m...@pe... |