in reply to Cheaper - Debug,Log,Errors via Slicing&dicing
- which I can control from outside
- Is removed from the code if disabled i.e. in production I don't want this to take cpu cycles (pruned at compile time)
- is short to write i.e. as less keystrokes as possible.
Perhaps the Log::Log4perl module could be useful? It satisfies the first and third of your requirements,
but not the second entirelyand the second in the sense that you can leave debug statements in production code and turn it on/off as you please. There is a small performance penalty, however, since at least one if test is performed for each statement. There is a performance discussion in the FAQ.Update: Clarified the second requirement.
--
Andreas
- Comment on Re: Cheaper - Debug,Log,Errors via Slicing&dicing