You are viewing a plain text version of this content. The canonical link for it is here.
Posted to apache-bugdb@apache.org by Lars Eilebrecht <sf...@unix-ag.org> on 1997/04/29 18:30:03 UTC
mod_log-any/508: Logging programs
>Number: 508
>Category: mod_log-any
>Synopsis: Logging programs
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: apache (Apache HTTP Project)
>State: open
>Class: sw-bug
>Submitter-Id: apache
>Arrival-Date: Tue Apr 29 09:30:03 1997
>Originator: sfx@unix-ag.org
>Organization:
apache
>Release: 1.2b8
>Environment:
Linux/i586 (2.0.29)
>Description:
Via CustomLog/TransferLog it's possible to log to a
program instead of a file (eg. TranferLog |/bin/foobar).
If the logging program is alive and working there is no
problem, but when the logging program crashed or had been
killed Apache becauses unusable.
Requests are accepted, but immediately after the client
send the request the connection is closed.
In the error log the following entry appears on every request:
"request lost connection to client <foobar>"
My question is now... Is it possible to handle such a case,
eg. to disable the logging funcionality, but still serve requests?
(By the way, is there a reason why the logging program has to be
run under the id of the user who started Apache (eg. root)?)
>How-To-Repeat:
Here's a minimal version of the script I used for testing:
#!/bin/sh
LOGFILE=/usr/local/etc/httpd/logs/badreferer.log
while /bin/true;
do
read l
if [ `echo "$l" | grep -c '\-$'` = 0 ];
then
echo "$l" >> $LOGFILE &
fi
done
Configuration:
CustomLog |/usr/local/etc/httpd/sbin/reflog.sh "%t %U %{Referer}i"
>Fix:
>Audit-Trail:
>Unformatted: