I took a look at CGI::Carp and it does not support the ability to specify the level of log msg that you want output. I also don't see a way to switch off logging altogether when in a production environment.
| [reply] |
You don't want to turn off the logging altogether in a production environment, merely not to send the output to the browser. CGI::Carp will, by default, send the output to stderr, hence to the server log, which you do want in a production environment.
The following snippet should help:
BEGIN {
my $carp_arg;
if ($ENV{ENV} =~ /DEV/) { # or some other test for a non producti
+on env
$carp_arg = 'fatalsToBrowser';
}
use CGI::Carp $carp_arg;
}
--
Oh Lord, won’t you burn me a Knoppix CD ?
My friends all rate Windows, I must disagree.
Your powers of persuasion will set them all free,
So oh Lord, won’t you burn me a Knoppix CD ? (Missquoting Janis Joplin)
| [reply] [d/l] |
Surely there are no bugs in the code you're running on your production environment ;)
Also, if you have if $DEBUG attached to the end of all your calls to warn then they'll just disappear when you set $DEBUG=undef
@_=qw; ask f00li5h to appear and remain for a moment of pretend better than a lifetime;;s;;@_[map hex,split'',B204316D8C2A4516DE];;y/05/os/&print;
| [reply] [d/l] [select] |
| [reply] |