httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dean Gaudet <dgau...@arctic.org>
Subject Re: [PATCH] loglevels final?
Date Sun, 27 Jul 1997 19:05:11 GMT
While I'm much happier with this approach (I too want it to be simple, and
syslog-style levels are just fine with me) you didn't address one of my
earlier complaints. 

On Sun, 27 Jul 1997, Randy Terbush wrote:

> -void log_pid(pool *p, char *pid_fname) {
> +API_EXPORT(void) aplog_error (int level, const request_rec *r, const char *routine,
> +			      const char *file, const char *fmt, ...)
> +{

I think that the prototype should be: 

API_EXPORT(void) aplog_error (int level, const request_rec *r,
    const char *fmt, ...);

one of the reasons is this code: 

> +    if (timestamp) { /* timestamp means we are logging to file */
> +	fprintf(r->server->error_log, "%s", errstr);
> +	vfprintf(r->server->error_log, fmt, args);
> +	fflush(r->server->error_log);
> +    }
> +    else {
> +	if (errstr)
> +	    syslog(level, "%s", errstr);
> +
> +	vsyslog(level, fmt, args);
> +    }

Is not atomic for the syslog. 

I also feel that "routine" and "file" are very vague, and don't apply to
all situations.

BTW you should probably also implement:

API_EXPORT(void) aplog_verror (int level, const request_rec *r,
    va_list args); 

Dean


Mime
View raw message