httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Randy Terbush <ra...@zyzzyva.com>
Subject Re: [PATCH] loglevels final?
Date Sun, 27 Jul 1997 19:49:20 GMT

dgaudet@arctic.org said:
> 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, ...);

I agree, I like losing the baggage.  However, unless I am being stupid,
I need this info to easily provide the existing output format for 
non-native modules. We have control over distributed stuff but 
would have to decide to dictate some other format for modules that 
continue to use the old routines. 


> 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