[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: Kris Deugau <kdeugau_at_vianet.ca>
Date: Thu, 17 Jan 2008 12:22:44 -0500

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_at_subversion.tigris.org
For additional commands, e-mail: users-help_at_subversion.tigris.org
Received on 2008-01-17 18:23:05 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.