Don't ask to ask, just ask | |
PerlMonks |
Moose based logging questionby jandrew (Chaplain) |
on Feb 09, 2014 at 13:18 UTC ( [id://1074111]=perlquestion: print w/replies, xml ) | Need Help?? |
jandrew has asked for the wisdom of the Perl Monks concerning the following question: Hello all, I am working on developing a Moose based logging Module. Yes I have reviewed the currently popular logging modules and while I used Log4perl for a while I still was looking for incremental functionality. I would like to ask the monastery for assistance in minimizing the impact of logging statements left in code. I am a largely a solo coder. Meaning I don't have a lot of code infrastructure at $work. While I acknowledge the long term value of all the test infrastructure that is best practice I sometimes don't have the time to implement it while getting stuff done. My solution is to leave the debug statements from development in my production code so that if I break some old code with a new piece of code I can trace it through the old stuff as well as the new stuff. The obvious issue with this is that the debug stuff costs some production overhead. I initially messed around with Smart::Comments since the production impact of these statements are near 0. However, I lost all of the goodness associated with logging namespaces and control from it. What is the best way to minimize the impact of deselected logging statements and deselected logging parameter evaluation in the following scenario?
Points for a Moose based answer! I already share some of my code on CPAN but I know that if I don't minimize the debug stuff that I leave in my code that most people will find it unusable. In a perfect world my logging config file would even be able to turn off parameter evaluation of some logging statements without having to wrap them in an if_error() block. Is that even possible? (Without source code filtering)
Back to
Seekers of Perl Wisdom
|
|