[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: how can I redirect Subversion/apache msgs to a new file

From: KM <info4km_at_yahoo.com>
Date: Wed, 16 Jan 2008 10:30:31 -0800 (PST)

All I did was edit my existing httpd.conf file for the apache server. It already contained the "DAV svn" line in each of my repository Location tags. e.g.
  <Location /myrepo>
    DAV svn
      SVNPath /usr/local/subversion/myrepo
      AuthType basic
    AuthName "My Subversion Repository"
    AuthUserFile /usr/local/subversion/passwdFile
    <LimitExcept GET PROPFIND OPTIONS REPORT>
        Require valid-user
    </LimitExcept>
</Location>
   
  to add the logging i did the following:
   
  1. stop the apache server
  2. added the following to my httpd.conf
  #Added a custom Log file for subversion - KM 7/24/2007
CustomLog logs/svn_logfile "%t %u %{SVN-ACTION}e" env=SVN-ACTION
LogFormat "%t %u %{SVN-ACTION}e" svn
  
3. restart the server
   
  It worked like a charm. The entries will be similar to the following:
  [14/Jan/2008:10:58:04 -0500] km commit r514
[14/Jan/2008:10:58:40 -0500] - update '/trunk/cfg_mgt/backup_scripts'
   
  Hope it helps
  KM

michael <cs_at_networkingnewsletter.org.uk> wrote:
  I asked yesterday about this but I think my original subject ("how to
customise Apache2 logs") wouldn't have caught the attention of
Subversion guys so apols for having to resend this...

I've tried following the subversion/svn example for putting svn-related
(over Apache/http) activities into a new log and decyphering the
actions, but nothing is appearing in my logfile (but it has been
created).

>From http://svnbook.red-bean.com/en/1.4/svn.serverconfig.httpd.html, it
says

mod_dav_svn, however, can come to your aid. By activating an
“operational logging” feature, you can ask mod_dav_svn to create a
separate log file describing what sort of high-level operations your
clients are performing.

To do this, you need to make use of Apache's CustomLog directive
(which is explained in more detail in Apache's own documentation). Be
sure to
invoke this directive outside of your Subversion Location block:

DAV svn
…

CustomLog logs/svn_logfile "%t %u %{SVN-ACTION}e" env=SVN-ACTION

In this example, we're asking Apache to create a special logfile
svn_logfile in the standard Apache logs directory. The %t and %u
variables are replaced by the time and username of the request,
respectively. The really important part are the two instances of
SVN-ACTION. When Apache sees that variable, it substitutes the
value of the SVN-ACTION environment variable, which is automatically
set by
mod_dav_svn whenever it detects a high-level client action.

I'm running Apache2 on Debian and I've added what I think is a suitable
CustomLog (I've tried both
to /etc/apache2/apache2.conf and/or
to /etc/apache2/mods-available/dav_svn.conf):

CustomLog /var/log/apache2/subversion.log "%t %u %{SVN-ACTION}e"
env=SVN-ACTION

but although the file is created nothing is being added to it, and I'm
still seeing copies of the Apache/svn cmds in apache2/access.log:

michael_at_ratty:/usr/local/SUBVERSION$ tail /var/log/apache2/access.log
veri.phy.umist.ac.uk - atmos_svn [11/Jan/2008:17:34:01 +0000]
"PROPFIND /svn/atmos_modelling/OpenMP_2 HTTP/1.1" 207 463 "-"
"SVN/1.4.4
(r25188) neon/0.25.5"
{etc}

Can anybody point out what I've overlooked?

Many thanks, Michael

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: users-help_at_subversion.tigris.org

       
---------------------------------
Never miss a thing. Make Yahoo your homepage.
Received on 2008-01-16 19:31:00 CET

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.