Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I get the SVN server log?

I am trying to find a way to get the SVN server-side log, but I only found the way to retrieve the client side logs using svn:log. How do I get the server-side logs?

like image 558
CrazyCoder Avatar asked Aug 08 '12 14:08

CrazyCoder


1 Answers

For SVN implementations that utilize the svnserve executable, it is possible to enable server-side logging by passing the --log-file switch when starting the daemon, e.g.:

# svnserve -d -r /svn --log-file=/var/log/svnserve.log

This would cause the svnserve daemon to log to the file /var/log/svnserve.log.

For the sake of thoroughness, the -d switch runs svnserve in "Daemon Mode", and the -r switch specifies the SVN repository root.

To take my response a step further, it is possible to configure svnserve as a service. This ensures that svnserve runs on system start-up, and is terminated gracefully on system shutdown.

One method to accomplish this on Debian (and Ubuntu) systems is described at http://odyniec.net/articles/ubuntu-subversion-server/ , and the author provides an initd script that should function correctly out-of-the-box: http://odyniec.net/articles/ubuntu-subversion-server/svnserve

For those who employ this script, logging can be enabled by modifying the DAEMON_ARGS variable on line 18 (as of this writing) to look something like:

DAEMON_ARGS="-d -r /svn --log-file=/var/log/svnserve.log"

The service would then be started with

# service svnserve start

and stopped with

# service svnserve stop

The script also accepts the restart and force-reload arguments.

like image 156
Ben Johnson Avatar answered Oct 13 '22 09:10

Ben Johnson