Re: [squid-users] access logging to a Named Pipe

From: Michael Smirnov <[email protected]>
Date: Wed, 17 Apr 2002 14:10:37 +0400

> I'm trying to log to a FIFO named pipe on FreeBSD 4.4-R, squid-2.5.PRE5.
> I did "mkfifo /var/log/squid/fifolog", "chown squid:squid
> /var/log/squid/fifolog",
> configured Squid "cache_access_log /var/log/squid/fifolog"
>
> I ran a small SUID perl script with owner "squid" on a virtual terminal,
> and tried to start Squid. I noticed in cache.log
> 2002/04/15 19:50:13| logfileOpen: /var/log/squid/fifolog: (6) Device not
> configured
>
> What is wrong with in logging?
> Should Squid logging function to be corrected?
>
> I cannot find a solution:
>
http://groups.google.com/groups?selm=9o9960%241jmm%241%40FreeBSD.csie.NCTU.e
> du.tw&output=gplain
>
The author of that old message was right -
"So the problem appears to be because squid is attempting to open the file
using non blocking io (the O_NONBLOCK flag)."
Named pipe-logging worked after
I commented out just 1 line in disk.c:

file_open(const char *path, int mode)
{
    int fd;
    if (mode & O_WRONLY)
        mode |= O_APPEND;
// mode |= SQUID_NONBLOCK;
    errno = 0;

I don't know, which bad effects it can have.
Can anyone of Squid developers help me to make a good patch
to this logging?
Received on Wed Apr 17 2002 - 04:10:43 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 17:07:35 MST