httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dean Gaudet <dgau...@arctic.org>
Subject error logs
Date Mon, 28 Jul 1997 11:18:27 GMT
Ugh, for some reason I never noticed that log_unixerr already did double
line log messages.  Bleh.  I'd really like to go to single line messages
in all cases.

Another thing that I'd like to consider is adding extra %-codes to
bprintf and ap_snprintf.  I've done this in other programs and found it
useful.  Two in particular:

%I takes a struct sockaddr_in and prints it in a.b.c.d:port form.
%Z takes an int n, and emits strerror(n)

Then say bind() fails in make_sock() you could:

    ap_log ("bind() failed for %I: %Z", server, errno);

Which is far easier than the current:

    fprintf(stderr,"httpd: could not bind to address %s port %d\n",
		inet_ntoa(server->sin_addr), ntohs(server->sin_port));

and since it's easier it would mean that we could annotate the rest
of the error messages in make_sock() ... 'cause right now on multi-Listen
servers you have no idea which socket caused the problems.

Oh yeah, can't we merge bprintf and snprintf code?

Dean


Mime
View raw message