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

Re: Proposal for Logging in Svnserve

From: John Peacock <jpeacock_at_rowman.com>
Date: 2005-07-13 03:23:02 CEST

Brian Holmes wrote:
> 3.1 Log files
>
> All log information will be written to a file. The log's
> filename and path should be specifiable through svnserve.conf
> with a line like the following:

Please consider having a --stdout option to svnserve itself, to just write the
log entries to STDOUT. I prefer to run `svnserve --foreground` and manage the
service via Dan Bernstein's daemontools:

        <http://cr.yp.to/daemontools.html>

so any logging can be automatically captured (and rotated automatically). I
know I can specify /dev/stdout as the filename, but it is cleaner if the support
is built in from the start. For that matter, you could simply have --foreground
automatically mean all logging goes to STDOUT, since this makes debugging very
much easier.

> 3.2 Log Entries
>
> Initially, there will be only one type of log entry which is written
> before any operation is performed. If authentication fails and the
> operation is aborted, a log entry will still be written.
>
> * log entries consist of:
> - the time
> - the remote connection's ip address
> - the user:
> if no authentication is required, write anonymous
> if user is authenticated write the user name
> if authentication failed, write "AUTHFAIL" or similar.
> - the opreration type
>
> [YYYY:mm:dd@HH:MM:SS] [IP Address] [User] [Operation Type]

I would suggest a seperate logging library be used which would handle the actual
logging (open file, write, close file) as well as the timestamp. Then, a
different log method can be more easily plugged in (syslog, STDOUT, cuneiform
tablets) much more easily. The logging module would just take an array (or
varargs <shudder>) and output it in whatever fashion was configured.

For combined logging (multiple repositories serviced by a single svnserve
instance), the log lines must also contain some identifier for the repository
involved (this would be important down the line for syslog as well). Again,
since I use multilog, I have no need for a timestamp since that program
automatically prepends a TAI value to each line (with the -t option), so it
would be nice to make that optional.

Glad to see someone is taking this on; I much prefer the ease of setup with
svnserve, but it would be very nice to have something in the log files! ;-)

John

-- 
John Peacock
Director of Information Research and Technology
Rowman & Littlefield Publishing Group
4720 Boston Way
Lanham, MD 20706
301-459-3366 x.5010
fax 301-429-5747
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Jul 13 03:23:25 2005

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

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