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

Re: Svnserve still exiting randomly in threaded mode

From: Greg Hudson <ghudson_at_MIT.EDU>
Date: 2004-05-18 19:52:21 CEST

On Tue, 2004-05-18 at 13:43, John Peacock wrote:
> Could you elaborate on this a little? I'm not sure I know what you are
> referring to.

I think he meant that debug-level logs should use a macro which
evaluates to nothing if a compile-time flag isn't turned on.

I don't believe that it matters, unless you've put a debug log inside a
tight loop (like the core of the vdelta loop). And I continue to
believe that debug-level logs are a bad idea, because (a) they clutter
the code, and (b) we can't easily put them in the libraries, and without
that they don't do any good.

> In both cases, the call to the logger routine should be wrapped by a check
> against a global loglevel variable.
> if ( loglevel > 0 ) /* log everything */ {log_this(DEBUG,"message")}
> if ( loglevel == 1 ) /* log info only */ {log_this(INFO,"message")}

-1 on using global variables.

And, once again, stop with the damn cycle micromanagement. Unless you
have a benchmark showing measurably worse performance from evaluating
the log level inside the logging function, don't clutter up the caller,
macros or no.

To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue May 18 19:52:46 2004

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.