You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Dean Gaudet <dg...@arctic.org> on 1997/07/28 13:18:27 UTC

error logs

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