Both the Apache httpd and svnserve Subversion servers provide support for high-level logging of Subversion operations. Configuring each of the server options to provide this level of logging is done differently, of course, but the output from each is designed to conform to a uniform syntax.
To enable high-level logging in svnserve, you need only
use the --log-file
command-line option when starting the
server, passing as the value to the option the file to which
svnserve should write its log output.
$ svnserve -d -r /path/to/repositories --log-file /var/log/svn.log
Enabling the same in Apache is a bit more involved, but is essentially an extension of Apache's stock log output configuration mechanisms—see 第 4.6.2 节 “Apache 日志” for details.
The following is a list of Subversion action log messages produced by its high-level logging mechanism, followed by one or more examples of the log message as it appears in the log output.
checkout-or-export /path r62 depth=infinity
commit harry r100
diff /path r15:20 depth=infinity ignore-ancestry diff /path1@15 /path2@20 depth=infinity ignore-ancestry
get-dir /trunk r17 text
get-file /path r20 props
get-file-revs /path r12:15 include-merged-revisions
get-mergeinfo (/path1 /path2)
lock /path steal
log (/path1,/path2,/path3) r20:90 discover-changed-paths revprops=()
replay /path r19
change-rev-prop r50 propertyname
rev-proplist r34
status /path r62 depth=infinity
switch /pathA /pathB@50 depth=infinity
unlock /path break
update /path r17 send-copyfrom-args
As a convenience to administrators who wish to post-process their Subversion
high-level logging output (perhaps for reporting or analysis purposes),
Subversion source code distributions provide a Python module (located at
tools/server-side/svn_server_log_parse.py
) which can
be used to parse Subversion's log output.