10

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?

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
CrazyCoder
  • 772
  • 5
  • 11
  • 31
  • What type of information you are looking for when you say 'server side log`? `svn log` at the top of repository will tell you everything about repository changes. Are you looking for user maintenance logs? – Bharat Sinha Aug 08 '12 at 18:06
  • I want to know that only administrator group logging information and also in which file these logging information's are available? – CrazyCoder Aug 09 '12 at 05:32
  • I am looking for admin maintenance logs? – CrazyCoder Aug 09 '12 at 05:36
  • 1
    I don't think that `subversion` keeps the admin maintenance logs. If deployed on UNIX box you can look for logging information there. – Bharat Sinha Aug 09 '12 at 05:41

1 Answers1

14

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.

Ben Johnson
  • 2,507
  • 3
  • 29
  • 29