From: Johannes K. <Joh...@vi...> - 2006-08-23 09:47:53
|
Mike Schilli schrieb: > 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... > > ------------------------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > _______________________________________________ > log4perl-devel mailing list > log...@li... > https://lists.sourceforge.net/lists/listinfo/log4perl-devel > > ... Or have a look at Attribute::Handlers (Part of Perl Core-distribution) A good instruction how to use: http://www.perl.com/pub/a/2003/06/19/treasures.html -- Johannes |