httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ben Laurie <...@algroup.co.uk>
Subject Re: [PATCH] loglevels final?
Date Sun, 27 Jul 1997 22:40:28 GMT
Randy Terbush wrote:
> 
> > At 04:07 PM 7/27/97 -0500, Randy wrote:
> > >We could just pass these into a variable argument list, but one of
> > >the motivations of this change is to get some control over the
> > >format of the error message. Perhaps someone here knows a way to
> > >get __FILE__, __LINE__ from the calling function, but I don't.
> >
> > Make aplog_error a macro?  i.e.
> >
> > #define aplog_error(a,b,c) aplog_err(__FILE__, __LINE__, a,b,c)
> >
> > but then we couldn't deal with varargs...
> >
> >       Brian
> 
> I considered this, but the variable argument list is absolutely
> necessary to replace existing logging functions with one function.

void aplog_error(const char *szFile,int nLine,const char *fmt,...);
#define MARK_LOG	__FILE__,__LINE

	aplog_error(MARK_LOG,"blurble");

Cheers,

Ben.

-- 
Ben Laurie                Phone: +44 (181) 994 6435  Email:
ben@algroup.co.uk
Freelance Consultant and  Fax:   +44 (181) 994 6472
Technical Director        URL: http://www.algroup.co.uk/Apache-SSL
A.L. Digital Ltd,         Apache Group member (http://www.apache.org)
London, England.          Apache-SSL author

Mime
View raw message