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

mod_dav_svn 'high level' logging ready for testing

From: Ben Collins-Sussman <sussman_at_collab.net>
Date: 2005-08-30 18:19:20 CEST

If you run the latest trunk mod_dav_svn, it's now possible to
configure your httpd.conf such that "high level" svn client actions
are recorded to the apache access log. To do this, you simply need to
use the httpd.conf 'CustomLog' directive such that your accesslog
records the SVN-ACTION environment variable as a new field. Or, if
you want the svn actions to be in a separate logfile, try:

    CustomLog logs/svnlog "%t %u \"%{SVN-ACTION}e\"" env=SVN-ACTION

--> We're not logging failures, only completed actions. That's because
failures are already being logged (in great detail) in the apache
errorlog.

--> Also note that we're only logging 'high-level' actions in the
SVN-ACTION variable. We're not logging every single request; that's
the job of the standard accesslog. When admins put the low-level
accesslog and the 'high-level' log together, a complete picture is
formed.

I'd love for folks to test it out, play around with it, give feedback.

(My next project is to add logging to svnserve, by having it send
messages to syslogd/win32-eventd. This will be much harder, because
we'll need to log not just high-level requests, but low-level requests
and errors as well.)

Here is a list of the actions which mod_dav_svn is making available to
apache's logging subsystem. I've done my best to disambiguate, but
some actions are just indistinguishable over the network (e.g. checkout
and export, or diff and merge).

* Write Commands

   - "locked '/path'"

   - "unlocked '/path'"

   - "changed value of revision property 'propname'"

   - "committed rNNNNN"

      It's impossible to know the exact client commands which produced
      a commit. It also doesn't really matter; anyone can run 'svn log
      -v' to see the exact set of paths changed in any commit.

* Read Commands

     We're *not* logging GET or depth-0 PROPFIND requests. They're not
     just used by 'svn cat' and 'svn info', but called constantly by
     'svn diff' and'svn merge'. Since 'svn diff/merge' is already
     being logged as a high-level action, there's no need to flood the
     log with GET/PROPFIND requests... an these things are already
     being logged in the standard apache 'accesslog' anyway. The
     upshot is that {'svn cat URL', 'svn info URL', 'svn
     proplist/propget URL'} are considered "low-level" requests, not
     high-level ones.

   - "log on '/path'", or "log on some set of paths below '/path'"

   - "blame on '/path'"

   - "checkout or export of '/path'"

   - "update of '/path'"

   - "status --update of '/path'"

   - "switch from '/path1' to '/path2'

   - "diff or merge, comparing '/path1 and '/path2'"

   - 'listing entries of directory '/path''

Here's some sample output. The goal being sastified here, of course,
is that you don't need a PhD in WebDAV/DeltaV to understand what's
going on (unlike trying to read the accesslog):

[25/Aug/2005:15:01:06 -0500] powerguy "committed r12"
[26/Aug/2005:14:30:17 -0500] powerguy "checkout or export of '/
blue1.zoomSave'"
[26/Aug/2005:14:33:10 -0500] sussman "switch to '/blue3.zoomSave'"
[29/Aug/2005:16:35:51 -0500] powerguy "diff or merge, comparing '/'
and '/'"
[29/Aug/2005:17:47:32 -0500] powerguy "listing entries of directory '/
fish'"
[29/Aug/2005:18:09:48 -0500] powerguy "changed value of revision
property 'svn:log'"
[29/Aug/2005:18:14:28 -0500] sussman "locked '/.DS_Store'"
[29/Aug/2005:18:14:28 -0500] sussman "unlocked '/.DS_Store'"
[29/Aug/2005:18:14:52 -0500] powerguy "update of '/fish'"
[29/Aug/2005:18:14:59 -0500] powerguy "log on '/fish2'"

-- 
www.collab.net  <>  CollabNet  |  Distributed Development On Demand
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Aug 30 18:26:06 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.