Kendall Lister wrote:
> 
> On Sat, 11 Dec 1999, Marlon Anthony Abao wrote:
> 
> > is there a way to log the access.log and cache.log to a pipe?
> >
> > i mean instead of logging them to a file, would it be possible to tell
> > squid to pipe them to another program?
> 
> Without even fiddling with Squid, you should be able to specify a named
> pipe as your log file - having never done this myself, I'm not sure
> exactly how you should set it up, but it would seem to be a good use of
> the technology.
> 
> --
>  Kendall Lister, Systems Operator for Charon I.S. - kendall@charon.net.au
>   Charon Information Services - Friendly, Cheap Melbourne ISP: 9589 7781
This is more or less off the top of my head. May include typos.
int    create_and_bind_unix_socket(const char *path)
{
        struct sockaddr_un serv_addr;
        int     s=socket(AF_UNIX,SOCK_STREAM,0);
        if(s==-1)
                {
                perror("socket");
                return -1;
                }
        serv_addr.sun_family=AF_UNIX;
        strcpy(serv_addr.sun_path,path.c_str());
    if(bind(s,(struct sockaddr *)&serv_addr,sizeof(serv_addr))<0)
        {
                perror("bind");
                close(s);
                return -1;
        }
        listen(s,20);
        return s;
}
Received on Wed Dec 15 1999 - 21:18:00 MST
This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:49:54 MST