Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • And next we go over the code and isolate all debugging and verbose logging so it can be controlled using flags from a single point.

    Did you mean: Log::Log4perl [cpan.org]

    • Nah, more in the line of:


      print STDERR "We are now in func2\n";
      print STDERR "we got params:\n", Dumper \@params;


      We have a lot of such code. I attempt only to inject
      when really desperately debugging or atleast isolating it behind


      if (DEBUG) { ... }
      • That’s the point: with Log4perl, you can leave it in. You configure at runtime precisely which logging messages you’re interested in (yes, while the program runs – not just at startup).

        Furthermore, if you worry about expensive computations in your logging statements, you can pass a closure instead of a string, which will be invoked only if that statement is enabled. The logger call still happens, so this is not as efficient as if (DEBUG) { ... } (which is completely optimised away at com