From: Lev L. <li...@so...> - 2006-08-22 00:46:59
|
Hello, having used log4cxx, and log4perl at my previous job where I got to run the show, I'm now in a position where I'm under the management of a fairly bright group of programmers, and I've been asked to integrate log4perl into an existing group of .pm's. Does anyone have any suggestions as far as best practices in log4perl? 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? thanks! -lev |