laziness, impatience, and hubris | |
PerlMonks |
Log4perl: Using appropriate Log Levelsby loris (Hermit) |
on Nov 24, 2005 at 09:08 UTC ( [id://511365]=perlquestion: print w/replies, xml ) | Need Help?? |
loris has asked for the wisdom of the Perl Monks concerning the following question: This does not really have anything to do with Perl, but I suspect that some of you may have encountered a similar problem. I have a module with a few subroutines which contain the main logic and several utility subroutines which do more or less trivial things. What I offen find happening is that a utility sub will produce an ERROR in the log and then the sub which called it will also log an ERROR, because the utility sub did not produce the expected result. In principle, I would prefer to only see the second ERROR and could just let the utility sub log, say, WARN. However, as the module get more complex, the distinction between 'main logic' sub and 'utility' sub seems to become less clear, and thus it seems more difficult to say what the appropriate log level should be. I suspect the answer lies in breaking down the module into smaller modules, thus forcing myself to distinguish between different categories of sub, so that I can turn logging on and off for each module separately, but perhaps some of you have other ideas. Thanks, "It took Loris ten minutes to eat a satsuma . . . twenty minutes to get from one end of his branch to the other . . . and an hour to scratch his bottom. But Slow Loris didn't care. He had a secret . . ."
Back to
Seekers of Perl Wisdom
|
|