Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Disable CGI Error Logging

Status
Not open for further replies.

Kirsle

Programmer
Jan 21, 2006
1,179
US
Does Apache have a way to disable error logging altogether, or at least disable logging of CGI warnings or errors?

For instance, having Apache log Perl warnings in a CGI script is kind of pointless. It's more work than it's worth to go through the error log to find warnings to correct.

The only way I could come up with to suppress logging of warnings is to set up a custom $SIG{__WARN__} handler in my Perl code. But that would have to be done for each CGI script.

So the error log gets really large really fast and is just pointlessly devouring hard disk space.

I've tried making error.log readonly (gave startup errors), tried setting ErrorLog to run a Perl script which did nothing (startup errors), and when I took out the ErrorLog directive completely, it still assumed logs/error.log

So any way to have Apache not log them?
 
In httpd.conf, set the LogLevel directive to any of the following: debug, info, notice, warn, error, crit, alert or emerg. More than likely it is currewntly set to warn.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top