Forum Moderators: coopster
cat mylogfile ¦grep -v foo > filteredlog
will give you a logfile with the entries containing 'foo' trimmed out.
Personally, I don't think omiting valuable data on the logs would be good; but good luck finding out.
inside my PHP
<?
apache_setenv("LOGOFF",1);
?>
Then inside the apache conf there would be an if statement.
inside my httpd.conf
if [ ]; then # Not sure on the exact if construct inside apache
error=yes
fi
Or maybe
inside my httpd.conf
CustomLog /usr/local/www/vhosts/website.com/logs/access_log COMBINED env=!LOGOFF
CustomLog /usr/local/www/vhosts/website.com/logs/ignore_log COMBINED env=LOGOFF
I am close I can feel it...
Conditional LoggingEnvironment variables can be logged in the access log using the LogFormat option %e. In addition, the decision on whether or not to log requests can be made based on the status of environment variables using the conditional form of the CustomLog directive. In combination with SetEnvIf this allows for flexible control of which requests are logged. For example, you can choose not to log requests for filenames ending in gif, or you can choose to only log requests from clients which are outside your subnet.
You would need a module to do that, I think.
<added>But you already knew, didn't you? :) </added>
[edited by: jatar_k at 12:54 am (utc) on Sep. 24, 2002]
[edit reason] trimmed trailing dot [/edit]
[httpd.apache.org...] will be helpful too :) Don't forget to tell us if this works, I had tried before but gave up.