Monday, July 28, 2014

double mint gum or svn please give me something useful

and it says, i do, i do (if logs are formatted correctly).
 per: http://svnbook.red-bean.com/en/1.6/svn-book.pdf  
 <Location /svn>  
 DAV svn  
 </Location>  
 CustomLog logs/svn_logfile "%t %u %{SVN-ACTION}e" env=SVN-ACTION  
 
results in this:  
 [26/Jan/2007:22:24:20 -0600] fritz get-dir /tags r1729 props  
 that's not useful.  
 but, more useful than:  
 [26/Jan/2007:22:25:29 -0600] "PROPFIND /svn/calc/!svn/vcc/default HTTP/1.1" 207 398  
 [26/Jan/2007:22:25:29 -0600] "PROPFIND /svn/calc/!svn/bln/59 HTTP/1.1" 207 449  
 [26/Jan/2007:22:25:29 -0600] "PROPFIND /svn/calc HTTP/1.1" 207 647  
 [26/Jan/2007:22:25:29 -0600] "REPORT /svn/calc/!svn/vcc/default HTTP/1.1" 200 607  
 [26/Jan/2007:22:25:31 -0600] "OPTIONS /svn/calc HTTP/1.1" 200 188  
 [26/Jan/2007:22:25:31 -0600] "MKACTIVITY  
 /svn/calc/!svn/act/e6035ef7-5df0-4ac0-b811-4be7c823f998 HTTP/1.1" 201 227  
 gross.  
 But if we do this:  
 CustomLog logs/svn_logfile "%{%Y-%m-%d %T}t %u@%h %>s repo:%{SVN-REPOS-NAME}e %{SVN-ACTION}e (%B Bytes in %T Sec)" env=SVN-ACTION  
 we get this:  
 
[2007-Jan-26 22:22:24:20] fritz@192.168.6.6 200 repo:project get-dir /tags r1729 props (10 Bytes in 10 Sec)   
 (thanks to this: http://peternixon.net/news/2010/04/09/useful-subversion-server-logs-apache-customlog/ for the clue)  
the above only works if have your svn server set up as a Virtual host.  Otherwise, place that line right along with your other log directive.  
reload apache2 and there you go.

log rotation would be a good idea, too.
Post a Comment