/ Zope / Apsis / Pound Mailing List / Archive / 2006 / 2006-08 / LogLevel2 Feature Request

[ << ] [ >> ]

[ No Subject / Brian Warshawsky ... ] [ Mismatched SSL Certificates / Brian Warshawsky ... ]

LogLevel2 Feature Request
"Kenneth Lin" <klin(at)rezlink.com>
2006-08-24 18:14:17 [ FULL ]
Here's a snippet of my log with Pound 2.1 on LogLevel2:

 

        Aug 24 12:09:02 pound1 pound: 72.174.16.20 GET
/Standard/calendar-folder.gif HTTP/1.1 - HTTP/1.0 304 Not Modified (:80)

 

I think it would be useful to log the Host: value from the request header so
I know which domain this client is attempting to access.  Also, it appears
that *cur_backend in

 

        case 2:

            str_be(buf, MAXBUF - 1, cur_backend);

            addr2str(caddr, MAXBUF - 1, &from_host);

            logmsg(LOG_INFO, "%s %s - %s (%s)", caddr, request, response,
buf);

            break;

 

is not picking up the address of the backend that's being accessed.  It's
only displaying the port number.

 

Thanks,


Ken



********************************************************************************************
IMPORTANT: The information contained in this message is privileged and
confidential.  It
is intended only for the use of the individual or entity named above.  If the
reader of this message is not the intended recipient, any dissemination or 
reproduction of it is strictly prohibited.  If you have received this
communication
in error, please contact us at postmaster(at)Rezlink.com immediately.  
Thank you.
********************************************************************************************
Attachments:  
text.html text/html 4781 Bytes

Re: [Pound Mailing List] LogLevel2 Feature Request
Robert Segall <roseg(at)apsis.ch>
2006-08-24 18:57:46 [ FULL ]
Small patch to fix the LogLevel 2 problem:

1. In http.c, line 1145 make sure it shows:

        case 2:
            str_be(buf, MAXBUF - 1, cur_backend);
            addr2str(caddr, MAXBUF - 1, &from_host);
            logmsg(LOG_INFO, "%s %s - %s (%s)", caddr, request, 
		response, buf);
            break;

2. In svc.c, line 142 make sure it shows:

    case PF_INET:
        addr2str(tmp, MAXBUF - 1, &be->addr.in.sin_addr);
        snprintf(buf, max, "%s:%hd", tmp, ntohs(be->addr.in.sin_port));
        break;

This will ensure the currect back-end address will show in the log
files. The change will be part of the next release.[...]

MailBoxer