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

libsvn_repos logging -- rethunk

From: Ben Collins-Sussman <sussman_at_collab.net>
Date: 2005-07-16 00:07:51 CEST

So Karl and I had another long chat, and now we're both thinking that
perhaps this logging design conversation has wandered down a path that
we're not so happy with.

My last conclusion was based on ghudson's suggestion: "bah, apache
already has errorlogs, let's just implement something similar within
svnserve's private code."

But now we're thinking that maybe this isn't so good.

First, errors are generally just as specific to repositories as
network requests. So if we think it's a good idea to have
repos-specfic accesslogs, it's likely just as useful to have
repos-specific errorlogs.

Second, svnserve and apache aren't the only users of svn_repos_t.
Other processes such as svnadmin, svnlook, viewcvs, or even 'svn
file:///' may all want to log errors. This implies that it would be
beneficial to have a public API for error-logging alongside the one
for access-logging. (Which is what I originally drafted.)

So we're backtracking a bit, and proposing this more grandiose vision:

   I. Repositories have an accesslog and an errorlog.

      A. repository logs live in repos/logs/. By default, a
          repository has an accesslog and errorlog in there.

      B. repositories grow their own configuration file in
          repos/conf/, named 'repos.conf'. For now, the only thing in
          that file are two variables stating where accesslog and
          errorlog live.

   II. Repos-specific public API for accesslog and errorlog

      A. svn_repos_open() parses repos/conf/repos.conf, and thus knows
          where the logs are. (If there is no repos.conf it creates
one.)

      B. API allows user to identify itself to the svn_repos_t, so
          that terms like "mod_dav_svn" and "svnserve" can show up in
          logs.

      C. API to write to errorlog and accesslog both take a
          svn_repos_t argument.

The objections people have brought up previously:

1. "What about errors (or access requests) that happen before we have
     an svn_repos_t?"

    Our feeling is that each process can decide how to handle those
    things on its own. A process may choose to:

      * not log such events at all

      * log them in a sensible global location

      * log them in location determined by a process-specific .conf
        file (such as svnserve.conf)

2. "But mod_dav_svn is already logging errors to apache's errorlog."

    We can change mod_dav_svn to:

      * log repos-inspecific errors in apache's errorlog, and
        repos-specific ones in the repository's errorlog.

      * give administrators a choice: "would you like repository
        specific errors to be logged in the repository's errorlog,
        apache's errorlog, or both?"

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