in reply to debugging /logging help
etc. That way I can leave them in until production or later, and bump things back up when I break something. I try to make it a habit to always write debug noise in like that at the start (every "print STDERR ..." line has a debug level) and it works out much easier as the development progresses.my $debug = 11; ... print STDERR "something worked: $wombat\n" if $debug > 5; ... print STDERR "in here: too much detail", join ", ", @_, "\n" if $debug > 20;
You could add something like that:
or something ...debugprint("now entering mysub ...\n", 11); sub debugprint($$) { my ($err_str, $debug_value) = @_; print $err_str if $debug_value >= $debug;
a
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: debugging /logging help
by gharris (Beadle) on Dec 07, 2000 at 21:35 UTC | |
by chipmunk (Parson) on Dec 07, 2000 at 21:40 UTC | |
by gharris (Beadle) on Dec 07, 2000 at 22:03 UTC |