6. High-level Logging

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
commit harry r100
Diffs
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
lock /path steal
Log
log (/path1,/path2,/path3) r20:90 discover-changed-paths revprops=()
版本重演 (svnsync)
replay /path r19
修订版本属性修改
change-rev-prop r50 propertyname
修订版本属性列表
rev-proplist r34
状态
status /path r62 depth=infinity
Switch
switch /pathA /pathB@50 depth=infinity
Unlock
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.