httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Sutton <p...@ukweb.com>
Subject Re: pre-patch: struct sockaddr_in error messages
Date Fri, 24 Oct 1997 15:59:07 GMT
On Fri, 24 Oct 1997, Jim Jagielski wrote:
> Martin Kraemer wrote:
> > On Fri, Oct 24, 1997 at 12:42:42AM -0700, Dean Gaudet wrote:
> > > This patch adds two extensions to ap_snprintf:
> > > 
> > > This is either a feature, or part of the log cleanup.  Take yer pick.
> > +4!  Put it in now, not for 2.0!           ^^^^^^^^^^^
> 
> ap_snprintf is a replacement for those OSs that lack a working
> snprintf(). These add 2 extensions to it. At that point it
> stops being a replacement, since OSs that already have a
> snprintf() will _need_ to use this one.

+1 for the functionality of logging client addresses, but I'm also worried
about making ap_snprintf customised. Can't this be done by adding another
flag to aplog_error instead - just like APLOG_ERRNO, which also adds
specific information to the log. E.g. 

   aplog_error(APLOG_MARK, APLOG_ERRNO|APLOG_ERR|APLOG_CLIENTADDR,
               r->server, "blah blah");

would log
   " ... Client 1.2.3.4 blah blah".

Um except you can't get the connection from r->server. Maybe you could
pass r->connection after r->server iff APLOG_CLIENTADDR is given, or pass
r instead of r->server everywhere? 

//pcs





Mime
View raw message