Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

"-w" is for warnings

by Kozz (Friar)
on Feb 18, 2002 at 21:47 UTC ( #146263=note: print w/ replies, xml ) Need Help??


in reply to How can I Disable script.error_log ?

I don't know that you would want to permanently disable those errors from being logged, but what you might do is this:

  • "use strict" everywhere
  • remove the "-w" flag, which will suppress some minor warnings
Keep in mind, however, that you should only remove the -w flag if this is a script in which you are confident is working without problems and is in a production environment... typically I run my scripts with -w while debugging, and afterwards will remove the "-w" flag, because it can spew LOTS of errors to your logs, depending on the contents of the script.

Or perhaps the lazy way would be to truncate the file intermittently with a cronjob.
*/30 * * * * cat /dev/null > /www/logs/script.error_log
would truncate the file to zero-length every 30 minutes.


Comment on "-w" is for warnings
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://146263]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (8)
As of 2014-12-27 12:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (177 votes), past polls