[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

RE: Re: libsvn_repos logging APIs (was Re: Proposal for Logging in Svnserve)

From: nick vajberg <nickvajberg_at_yahoo.dk>
Date: 2005-07-14 19:27:51 CEST

> On Jul 14, 2005, at 11:59 AM, John Peacock wrote:
> >
> > svn_log(DEBUG, logger, message);
> > svn_log(INFO, logger, message);
> > svn_log(WARN, logger, message);
> > svn_log(ERROR, logger, message);
> > svn_log(FATAL, logger, message);
> >
> > The log level is an *variable* of logging API, not
> a top level
> > object. There is really no justification for
> seperate functions,
> > since they should all be using the same lower
> level code. If you
> > really like your signatures, there could always be
> syntactic sugar
> > #define's.
> Agreed, this is how apache logging API does it.

I must disagree with

  svn_log(DEBUG, logger, "problem")

beeing more readable than

  svn_log_debug(logger, "problem")

More importantly: Quite a few developers beeing used
to the existing logging frameworks expects these
methods to be around. It has become something of a
de-facto standard (ref. my other post)

Something else: The API should include a
svn_log_setlevel(int level) function. The "basic
selection rule" from logging.apache.org applies:

"A log request of level p in a logger with (either
assigned or inherited, whichever is appropriate) level
q, is enabled if p >= q."

To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Jul 14 19:28:33 2005

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.