You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by michael <cs...@networkingnewsletter.org.uk> on 2008/01/16 17:48:19 UTC

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

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:

 <Location /svn>
   DAV svn
   …
 </Location>

 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@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@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org


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

Posted by Steve Kemp <st...@debian-administration.org>.
On Thu Jan 17, 2008 at 17:41:11 +0000, michael wrote:

> Okay, given this seems somewhat Debian-related (rather than subversion
> only) I've added Debian-user to the cc list and also the
> debian-admininstration lot in case they wish to use the info:

  There is no 'debian-administration lot'.  This is a mail address
 for website problems, bug reports, etc.

  Requests for help to this address generally receive a polite reply
 saying that I do not offer personal support to unsolicited mails.

  Please do not Cc any replies here.

Steve
-- 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

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

Posted by michael <cs...@networkingnewsletter.org.uk>.
On Thu, 2008-01-17 at 12:22 -0500, Kris Deugau wrote:
> michael wrote:
> > Glad you've both got it working.
> 
> I'm afraid I have to add a "Works for me too!" to that;  I just added 
> SVN action logging to one vhost, checked out and committed to a test 
> repo;  switched the working copy to an alternate vhost, and added action 
> logging (to a different file) to that vhost.  No errors, action logs 
> showed up as they should.
> 
> > I'm using a Debian dist of Apache2
> > which, if I understand correctly, doesn't use httpd.conf but for general
> > stuff uses apache2.conf and for modules uses the relevant module conf
> > file eg mods-available/dav_svn.conf
> 
> Mmmh.  Debian has introduced a very flexible configuration system for 
> Apache.  Packaged Apache modules put configuration fragments in 
> /etc/apache2/mods-available, but they're not used unless there's a 
> matching symlink in /etc/apache2/mods-enabled.  A similar system is used 
> for vhosts.
> 
> Unless you really want options to apply to all vhosts, it's probably 
> best to leave the fragments in mods-available alone, and add 
> configuration to the vhost fragments in /etc/apache2/sites-available.
> 
> I usually open any of these fragments using the mods-enabled/ or 
> sites-enabled/ path and the symlink, to make sure I'm actually editing a 
> live file and not one that's disabled.
> 
> Run "a2enmod" and see what mods are actually loaded.  Then restart 
> Apache to make sure that's what's actually running.
> 
> Do you see any warnings in the main error log?
> 
> Are you able to use any repositories you've set up?  From your original 
> message it sounds like repository access is working, because otherwise 
> it sounds like your configuration just isn't getting parsed.
> 
> [fiddles configs]  I think I may have found your problem, but I can't 
> explain *why* it's happening.  On two machines, with three vhosts, I 
> have SVN action logs enabled and working.  However, the CustomLog 
> directive is inside each individual vhost block;  it's not "global" as 
> you appear to be trying to do.  When I tried adding the CustomLog 
> directive in the same location as you're trying, I get the same result - 
> log file is created, but nothing gets written to it.
> 
> Try adding the CustomLog to the vhost container for the vhost you're 
> trying to enable logging on - the "default" vhost should work OK if you 
> don't have any others.  I'm not certain about this, however;  you may 
> have to define a vhost, or at least move all of your live SVN 
> configuration into the 000-default vhost configuration fragment.
> 
> (The /etc/apache2/mods-available/dav_svn.conf file is in fact completely 
> commented out on the one machine;  all actual SVN configuration is in 
> the vhost definitions.  Aside from the other machine being CentOS and 
> using a different set of fragments it's the same story.)
> 
> > ### not sure why following does not work
> > ### #MKB: turn on custom logs for easier reading
> > CustomLog /var/log/apache2/subversion.log "%t %u %{SVN-ACTION}e" env=SVN-ACTION
> > LogFormat "%t %u %{SVN-ACTION}e" svn
> 
> The LogFormat line here isn't really doing anything useful for two 
> reasons:  you've already given CustomLog the log format description, and 
> you're defining the log format after the statement defining the log 
> file.  See 
> http://httpd.apache.org/docs/2.0/mod/mod_log_config.html#customlog.
> 
> -kgd


Okay, given this seems somewhat Debian-related (rather than subversion
only) I've added Debian-user to the cc list and also the
debian-admininstration lot in case they wish to use the info:

Kris, I've followed your example and 
a) yes, dav_svn.conf is enabled

b) removed all Subversion-related CustomLog directives from
mods-available/dav_svn.conf

c) I've only the default virtual host: 
	michael@ratty:/etc/apache2$ ls sites-available/
	default  default~
so have editted that to include the line
	CustomLog /var/log/apache2/subversion.log "%t %u %{SVN-ACTION}e"
env=SVN-ACTION
immediately after the line
	CustomLog /var/log/apache2/access.log combined
in the (only) VirtualHost present in that file.

Then reloading apache2 and doing an 'svn export' (on another machine) I
do indeed get the required result:

michael@ratty:/var/log/apache2$ cat subversion.log
[17/Jan/2008:17:33:38 +0000] atmos_svn checkout-or-export '/'


Many thanks and I hope other Debian users find your help useful!

Michael



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

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

Posted by Kris Deugau <kd...@vianet.ca>.
michael wrote:
> Glad you've both got it working.

I'm afraid I have to add a "Works for me too!" to that;  I just added 
SVN action logging to one vhost, checked out and committed to a test 
repo;  switched the working copy to an alternate vhost, and added action 
logging (to a different file) to that vhost.  No errors, action logs 
showed up as they should.

> I'm using a Debian dist of Apache2
> which, if I understand correctly, doesn't use httpd.conf but for general
> stuff uses apache2.conf and for modules uses the relevant module conf
> file eg mods-available/dav_svn.conf

Mmmh.  Debian has introduced a very flexible configuration system for 
Apache.  Packaged Apache modules put configuration fragments in 
/etc/apache2/mods-available, but they're not used unless there's a 
matching symlink in /etc/apache2/mods-enabled.  A similar system is used 
for vhosts.

Unless you really want options to apply to all vhosts, it's probably 
best to leave the fragments in mods-available alone, and add 
configuration to the vhost fragments in /etc/apache2/sites-available.

I usually open any of these fragments using the mods-enabled/ or 
sites-enabled/ path and the symlink, to make sure I'm actually editing a 
live file and not one that's disabled.

Run "a2enmod" and see what mods are actually loaded.  Then restart 
Apache to make sure that's what's actually running.

Do you see any warnings in the main error log?

Are you able to use any repositories you've set up?  From your original 
message it sounds like repository access is working, because otherwise 
it sounds like your configuration just isn't getting parsed.

[fiddles configs]  I think I may have found your problem, but I can't 
explain *why* it's happening.  On two machines, with three vhosts, I 
have SVN action logs enabled and working.  However, the CustomLog 
directive is inside each individual vhost block;  it's not "global" as 
you appear to be trying to do.  When I tried adding the CustomLog 
directive in the same location as you're trying, I get the same result - 
log file is created, but nothing gets written to it.

Try adding the CustomLog to the vhost container for the vhost you're 
trying to enable logging on - the "default" vhost should work OK if you 
don't have any others.  I'm not certain about this, however;  you may 
have to define a vhost, or at least move all of your live SVN 
configuration into the 000-default vhost configuration fragment.

(The /etc/apache2/mods-available/dav_svn.conf file is in fact completely 
commented out on the one machine;  all actual SVN configuration is in 
the vhost definitions.  Aside from the other machine being CentOS and 
using a different set of fragments it's the same story.)

> ### not sure why following does not work
> ### #MKB: turn on custom logs for easier reading
> CustomLog /var/log/apache2/subversion.log "%t %u %{SVN-ACTION}e" env=SVN-ACTION
> LogFormat "%t %u %{SVN-ACTION}e" svn

The LogFormat line here isn't really doing anything useful for two 
reasons:  you've already given CustomLog the log format description, and 
you're defining the log format after the statement defining the log 
file.  See 
http://httpd.apache.org/docs/2.0/mod/mod_log_config.html#customlog.

-kgd

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

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

Posted by michael <cs...@networkingnewsletter.org.uk>.
On 17 Jan 2008, at 15:12, david.x.grierson@jpmorgan.com wrote:

> What version of Subversion are you using? SVN-ACTION was only  
> introduced
> in 1.3.x releases

michael@ratty:~$ svn --version
svn, version 1.4.2 (r22196)
    compiled Nov 10 2006, 17:39:50

which is from Debian package

michael@ratty:~$ dpkg -l subversion
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Installed/Config-files/Unpacked/Failed-config/Half- 
installed
|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err:  
uppercase=bad)
||/ Name           Version        Description
+++-==============-==============- 
============================================
ii  subversion     1.4.2dfsg1-2   Advanced version control system


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

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

Posted by da...@jpmorgan.com.
What version of Subversion are you using? SVN-ACTION was only introduced 
in 1.3.x releases

Dg.
--
David Grierson
JPMorgan - IB Architecture - Source Code Management Consultant
GDP 228-5574 / DDI +44 141 228 5574 / Email david.x.grierson@jpmorgan.com
Alhambra House 6th floor, 45 Waterloo Street, Glasgow G2 6HS
 



michael <cs...@networkingnewsletter.org.uk> 
17/01/2008 14:49

To
users@subversion.tigris.org
cc
KM <in...@yahoo.com>, david.x.grierson@jpmorgan.com
Subject
Re: how can I redirect Subversion/apache msgs to a new file






On Thu, 2008-01-17 at 10:30 +0000, david.x.grierson@jpmorgan.com wrote:
> Works fine for me ... thanks for the idea :-)
> 
> [16/Jan/2008:05:40:18 -0500] - update '/tags/DEV2'
> [16/Jan/2008:05:40:47 -0500] v026091 unlock '/tags/DEV2/README.txt'
> [16/Jan/2008:06:05:15 -0500] - remote-status '/trunk'
> [16/Jan/2008:06:05:42 -0500] v026091 commit r53
> [16/Jan/2008:06:10:41 -0500] - remote-status '/tags/DEV2'
> [16/Jan/2008:06:11:19 -0500] - switch '/tags/DEV2' '/trunk'
> [16/Jan/2008:06:11:24 -0500] - list-dir '/trunk/'
> [16/Jan/2008:06:11:26 -0500] - list-dir '/trunk/'
> [16/Jan/2008:06:11:32 -0500] - switch '/trunk' '/tags/DEV4'
> [16/Jan/2008:06:11:35 -0500] - switch '/tags/DEV4' '/tags/DEV2'
> [16/Jan/2008:06:11:38 -0500] - switch '/tags/DEV2' '/tags/DEV3'
> [16/Jan/2008:06:11:39 -0500] - switch '/tags/DEV3' '/tags/DEV1'
> [16/Jan/2008:06:11:43 -0500] - switch '/tags/DEV1' '/tags/DEV2'
> 
> CustomLog logs/svn-actions.log "%t %u %{SVN-ACTION}e" env=SVN-ACTION
> 
> I've even tried it using it as a pipe with rotatelog and that works fine 

> too:
> 
> CustomLog "|/usr/sbin/rotatelogs logs/svn-actions.log 86400" "%t %u 
> %{SVN-ACTION}e" env=SVN-ACTION
> 
> Need to expand it a wee bit to get the repository name into the log as 
> well though.
> 
> Dg.

David, KM (hope okay to CC you?) et al,

Glad you've both got it working. I'm using a Debian dist of Apache2
which, if I understand correctly, doesn't use httpd.conf but for general
stuff uses apache2.conf and for modules uses the relevant module conf
file eg mods-available/dav_svn.conf

I've attached my mods-available/dav_svn.conf which seems fine as far as
I can tell. (I've also tried the CustomLog in the apache2.conf but no
help) And here's the permissions set for the required logfile (you can
see that Apache2 has created it but then I changed the
permissions/ownership from root:root)
michael@ratty:/var/log/apache2$ lshead
total 7480
-rw-r-----  1 root adm      4890980 Jan 17 14:36 access.log
-rw-r-----  1 root adm      1428669 Jan 17 14:36 error.log
drwxr-xr-x  2 root root        4096 Jan 17 14:29 ./
-rw-rw-r--  1 root www-data       0 Jan 17 14:29 subversion.log
drwxr-xr-x 17 root root        4096 Jan 17 06:26 ../

I run Apache2 as www-data:
michael@ratty:/var/log/apache2$ ps -elf|grep apache
1 S root     16548     1  0  78   0 -  2662 -      14:36 ?
00:00:00 /usr/sbin/apache2 -k start
5 S www-data 16549 16548  0  78   0 -  2605 375754 14:36 ?
00:00:00 /usr/sbin/apache2 -k start
5 S www-data 16550 16548  0  78   0 - 58136 pipe_w 14:36 ?
00:00:00 /usr/sbin/apache2 -k start
5 S www-data 16552 16548  0  82   0 - 58068 pipe_w 14:36 ?
00:00:00 /usr/sbin/apache2 -k start
0 S michael  16621 16237  0  78   0 -   819 pipe_w 14:38 pts/3
00:00:00 grep apache


Any ideas what I've overlooked?
Thanks, Michael
[attachment "dav_svn.conf" deleted by David X Grierson/JPMCHASE] 
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Generally, this communication is for informational purposes only
and it is not intended as an offer or solicitation for the purchase
or sale of any financial instrument or as an official confirmation
of any transaction. In the event you are receiving the offering
materials attached below related to your interest in hedge funds or
private equity, this communication may be intended as an offer or
solicitation for the purchase or sale of such fund(s).  All market
prices, data and other information are not warranted as to
completeness or accuracy and are subject to change without notice.
Any comments or statements made herein do not necessarily reflect
those of JPMorgan Chase & Co., its subsidiaries and affiliates.

This transmission may contain information that is privileged,
confidential, legally privileged, and/or exempt from disclosure
under applicable law. If you are not the intended recipient, you
are hereby notified that any disclosure, copying, distribution, or
use of the information contained herein (including any reliance
thereon) is STRICTLY PROHIBITED. Although this transmission and any
attachments are believed to be free of any virus or other defect
that might affect any computer system into which it is received and
opened, it is the responsibility of the recipient to ensure that it
is virus free and no responsibility is accepted by JPMorgan Chase &
Co., its subsidiaries and affiliates, as applicable, for any loss
or damage arising in any way from its use. If you received this
transmission in error, please immediately contact the sender and
destroy the material in its entirety, whether in electronic or hard
copy format. Thank you.
Please refer to http://www.jpmorgan.com/pages/disclosures for
disclosures relating to UK legal entities.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

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

Posted by michael <cs...@networkingnewsletter.org.uk>.
On Thu, 2008-01-17 at 10:30 +0000, david.x.grierson@jpmorgan.com wrote:
> Works fine for me ... thanks for the idea :-)
> 
> [16/Jan/2008:05:40:18 -0500] - update '/tags/DEV2'
> [16/Jan/2008:05:40:47 -0500] v026091 unlock '/tags/DEV2/README.txt'
> [16/Jan/2008:06:05:15 -0500] - remote-status '/trunk'
> [16/Jan/2008:06:05:42 -0500] v026091 commit r53
> [16/Jan/2008:06:10:41 -0500] - remote-status '/tags/DEV2'
> [16/Jan/2008:06:11:19 -0500] - switch '/tags/DEV2' '/trunk'
> [16/Jan/2008:06:11:24 -0500] - list-dir '/trunk/'
> [16/Jan/2008:06:11:26 -0500] - list-dir '/trunk/'
> [16/Jan/2008:06:11:32 -0500] - switch '/trunk' '/tags/DEV4'
> [16/Jan/2008:06:11:35 -0500] - switch '/tags/DEV4' '/tags/DEV2'
> [16/Jan/2008:06:11:38 -0500] - switch '/tags/DEV2' '/tags/DEV3'
> [16/Jan/2008:06:11:39 -0500] - switch '/tags/DEV3' '/tags/DEV1'
> [16/Jan/2008:06:11:43 -0500] - switch '/tags/DEV1' '/tags/DEV2'
> 
> CustomLog logs/svn-actions.log "%t %u %{SVN-ACTION}e" env=SVN-ACTION
> 
> I've even tried it using it as a pipe with rotatelog and that works fine 
> too:
> 
> CustomLog "|/usr/sbin/rotatelogs logs/svn-actions.log 86400" "%t %u 
> %{SVN-ACTION}e" env=SVN-ACTION
> 
> Need to expand it a wee bit to get the repository name into the log as 
> well though.
> 
> Dg.

David, KM (hope okay to CC you?) et al,

Glad you've both got it working. I'm using a Debian dist of Apache2
which, if I understand correctly, doesn't use httpd.conf but for general
stuff uses apache2.conf and for modules uses the relevant module conf
file eg mods-available/dav_svn.conf

I've attached my mods-available/dav_svn.conf which seems fine as far as
I can tell. (I've also tried the CustomLog in the apache2.conf but no
help) And here's the permissions set for the required logfile (you can
see that Apache2 has created it but then I changed the
permissions/ownership from root:root)
michael@ratty:/var/log/apache2$ lshead
total 7480
-rw-r-----  1 root adm      4890980 Jan 17 14:36 access.log
-rw-r-----  1 root adm      1428669 Jan 17 14:36 error.log
drwxr-xr-x  2 root root        4096 Jan 17 14:29 ./
-rw-rw-r--  1 root www-data       0 Jan 17 14:29 subversion.log
drwxr-xr-x 17 root root        4096 Jan 17 06:26 ../

I run Apache2 as www-data:
michael@ratty:/var/log/apache2$ ps -elf|grep apache
1 S root     16548     1  0  78   0 -  2662 -      14:36 ?
00:00:00 /usr/sbin/apache2 -k start
5 S www-data 16549 16548  0  78   0 -  2605 375754 14:36 ?
00:00:00 /usr/sbin/apache2 -k start
5 S www-data 16550 16548  0  78   0 - 58136 pipe_w 14:36 ?
00:00:00 /usr/sbin/apache2 -k start
5 S www-data 16552 16548  0  82   0 - 58068 pipe_w 14:36 ?
00:00:00 /usr/sbin/apache2 -k start
0 S michael  16621 16237  0  78   0 -   819 pipe_w 14:38 pts/3
00:00:00 grep apache


Any ideas what I've overlooked?
Thanks, Michael

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

Posted by da...@jpmorgan.com.
Works fine for me ... thanks for the idea :-)

[16/Jan/2008:05:40:18 -0500] - update '/tags/DEV2'
[16/Jan/2008:05:40:47 -0500] v026091 unlock '/tags/DEV2/README.txt'
[16/Jan/2008:06:05:15 -0500] - remote-status '/trunk'
[16/Jan/2008:06:05:42 -0500] v026091 commit r53
[16/Jan/2008:06:10:41 -0500] - remote-status '/tags/DEV2'
[16/Jan/2008:06:11:19 -0500] - switch '/tags/DEV2' '/trunk'
[16/Jan/2008:06:11:24 -0500] - list-dir '/trunk/'
[16/Jan/2008:06:11:26 -0500] - list-dir '/trunk/'
[16/Jan/2008:06:11:32 -0500] - switch '/trunk' '/tags/DEV4'
[16/Jan/2008:06:11:35 -0500] - switch '/tags/DEV4' '/tags/DEV2'
[16/Jan/2008:06:11:38 -0500] - switch '/tags/DEV2' '/tags/DEV3'
[16/Jan/2008:06:11:39 -0500] - switch '/tags/DEV3' '/tags/DEV1'
[16/Jan/2008:06:11:43 -0500] - switch '/tags/DEV1' '/tags/DEV2'

CustomLog logs/svn-actions.log "%t %u %{SVN-ACTION}e" env=SVN-ACTION

I've even tried it using it as a pipe with rotatelog and that works fine 
too:

CustomLog "|/usr/sbin/rotatelogs logs/svn-actions.log 86400" "%t %u 
%{SVN-ACTION}e" env=SVN-ACTION

Need to expand it a wee bit to get the repository name into the log as 
well though.

Dg.
--
David Grierson
JPMorgan - IB Architecture - Source Code Management Consultant
GDP 228-5574 / DDI +44 141 228 5574 / Email david.x.grierson@jpmorgan.com
Alhambra House 6th floor, 45 Waterloo Street, Glasgow G2 6HS
 



michael <cs...@networkingnewsletter.org.uk> 
16/01/2008 17:48

To
users@subversion.tigris.org
cc

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






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:

 <Location /svn>
   DAV svn
   …
 </Location>

 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@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@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org





Generally, this communication is for informational purposes only
and it is not intended as an offer or solicitation for the purchase
or sale of any financial instrument or as an official confirmation
of any transaction. In the event you are receiving the offering
materials attached below related to your interest in hedge funds or
private equity, this communication may be intended as an offer or
solicitation for the purchase or sale of such fund(s).  All market
prices, data and other information are not warranted as to
completeness or accuracy and are subject to change without notice.
Any comments or statements made herein do not necessarily reflect
those of JPMorgan Chase & Co., its subsidiaries and affiliates.

This transmission may contain information that is privileged,
confidential, legally privileged, and/or exempt from disclosure
under applicable law. If you are not the intended recipient, you
are hereby notified that any disclosure, copying, distribution, or
use of the information contained herein (including any reliance
thereon) is STRICTLY PROHIBITED. Although this transmission and any
attachments are believed to be free of any virus or other defect
that might affect any computer system into which it is received and
opened, it is the responsibility of the recipient to ensure that it
is virus free and no responsibility is accepted by JPMorgan Chase &
Co., its subsidiaries and affiliates, as applicable, for any loss
or damage arising in any way from its use. If you received this
transmission in error, please immediately contact the sender and
destroy the material in its entirety, whether in electronic or hard
copy format. Thank you.
Please refer to http://www.jpmorgan.com/pages/disclosures for
disclosures relating to UK legal entities.

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

Posted by KM <in...@yahoo.com>.
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...@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@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@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org



       
---------------------------------
Never miss a thing.   Make Yahoo your homepage.