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

Re: libsvn_repos logging -- rethunk

From: Ben Collins-Sussman <sussman_at_collab.net>
Date: 2005-07-16 15:57:27 CEST

On Jul 16, 2005, at 8:12 AM, John Peacock wrote:

> Ben Collins-Sussman wrote:
>
>> So we're backtracking a bit, and proposing this more grandiose
>> vision:
>> I. Repositories have an accesslog and an errorlog.
>>
>
> I'm depressed that I am, to date, unable to articulate to anyone
> else why I think this design is too limited in scope. My primary
> objection remains that it assumes that everyone will want to write
> log _files_ and there is no way to expand it beyond that realm. I
> fully and freely admit that *most* people will want to log to
> files, but this design will not permit any other scheme to be added
> later without completely replacing the interface (i.e. 2.0).

Our proposal states that repos/conf/repos.conf has two variables that
allow administrators to decide where logfiles live. We can create a
special value for these variables that means "send to STDOUT". Would
that satisfy your feature request?

>
> I'm also not clear why I am unable to describe my reasoning behind
> the use of a structured log object. It seems so much easier to do
> this:
>
> svn_log_baton_t log = svn_init_log(repos);
> ...
> if (level < log.level)
> svn_log_error(log, level, "message");
>
> where the "log" object contains all of the information required to
> output the log.

How is that different than my proposal, whereby the "svn_repos_t"
object contains all the information to output to the log? I see no
difference between

     svn_log_error(logobject, level, "message")

and

     svn_log_error(reposobject, level, "message")

> The proposed API requires the caller to keep track of a bunch of
> values which don't change over the lifetime of the operation

It does? What values? Where? That's news to me.

My plan is currently in line with what ghudson has been suggesting:
no need for a calling process to cache the current 'global loglevel'
at all. The loglevel lives inside the repos object. We pass
varargs into svn_log_error(), which can then *internally* decide to
construct the message or not, based on repos->loglevel's value.

>
> 1) each library would be capable of having a dedicated log file, or
> not, with a different "global" log level or not;
>

Each *library*? People are already criticizing my design for
creating too many logfiles, rather than one "uber logfile". I don't
see why it would be good for every single svn library to start
dropping logfiles. Can you explain?

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Jul 16 16:00:01 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.