You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Daniel Kastenholz <da...@in.tum.de> on 2005/02/26 12:43:22 UTC

Very basic traffic measurement for svnserve?

Hi,

I've recently installed svnserve on a server that is shared by a number 
of projects and miss the ability to perform a (very basic) traffic 
accounting.

I haven't looked into the sources, yet, but I assume that
- there is some sort of session management implemented
- every new connection (TCP/IP, STDIN/STDOUT, ... ?) gets such a session 
assigned
- every session has a session descriptor
- a traffic counter could be added to this descriptor that could be 
increased whenever data is written to or read from the stream
- when a session is terminated, the name of the repository and the value 
of the counter could be written to some kind of logging facility (log 
file, syslog, ...).

To forestall misunderstandings: Yes, I'm willing to implement the 
feature myself.

But before I start it would be important for me to know if you would 
take this patch into an official release. I update regularly from RPM's, 
and before it turns out that I have to patch again and again, I'd rather 
choose a different approach, probably involving packet analysis or some 
other really bad and oversized hack. So if you have any objections in 
priciple, I'd appreciate if you could make them now. And if you don't, 
please support this patch!

Any architecture- or style-related suggestions, remarks, hints... ?

Thanks!


Daniel

---
PS: Yes, I know that traffic measurement would be possible with Apache & 
WebDAV.


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

Re: Very basic traffic measurement for svnserve?

Posted by kf...@collab.net.
Justin Erenkrantz <ju...@erenkrantz.com> writes:
> I could have sworn that we placed those 'temporary' functions under
> the svn namespace (svn_*).  Placing it in the apr_* namespace is bad.

I have this memory that we did it with some apr_* names, but I'm too
lazy to dig it out of the archives.  In any case, the important point
is that I am wrong about how #ifndef behaves :-), which explains the
miscommunication here!

I had thought #ifdef and #ifndef consider any symbols, not just things
defined with #define.  IOW, this program would print "Hello, world!":

   #include <stdio.h>
   
   #ifndef printf
   int printf (const char *fmt, ...)
   {
     char *str = "Ignore the arguments, just print this line instead.\n";
     int len = strlen (str);
     fwrite (str, 1, len, stdout);
     fflush (stdout);
     return 0;
   }
   #endif /* printf !defined */
   
   int main ()
   {
     printf ("Hello, world!\n");
     return 0;
   }

But it prints out "Ignore the argument..." etc instead.  I had
expected the entire #ifndef block to be a no-op, because we'd already
included stdio.h by then, but I was wrong.  (We won't discuss the fact
that even if it behaved the way I thought, one might still
accidentally redefine foreign symbols at link time if one forgot to
include the right header, ahem.)

So if we ever did things that way, which I now doubt, it was eeeeevil,
and using svn_* prefixes, which I too recall we did on at least some
occasions, is the appropriate way.

For the purposes of what I was suggesting to Greg, this is all
irrelevant, as changing a prefix isn't the hard part of that task
anyway.

Learn something every day,
-Karl

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

Re: Very basic traffic measurement for svnserve?

Posted by Justin Erenkrantz <ju...@erenkrantz.com>.
--On Monday, February 28, 2005 4:51 PM -0600 kfogel@collab.net wrote:

> Uh, what about those #ifndefs I mentioned?  (I accidentally wrote
> "#ifundef", perhaps that was confusing?  Sorry if so.)
>
> We did this with the full knowledge of the APR developers, who
> welcomed it as a technique for testing & working the bugs out of new
> APIs before folding them into APR itself.

I could have sworn that we placed those 'temporary' functions under the svn 
namespace (svn_*).  Placing it in the apr_* namespace is bad.  -- justin

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

Re: Very basic traffic measurement for svnserve?

Posted by Greg Hudson <gh...@MIT.EDU>.
On Mon, 2005-02-28 at 17:51, kfogel@collab.net wrote:
> > > functions whose names begin with "apr_" into the Subversion code

> > That's totally unacceptable, and to the extend that we've done it in the
> > past, we are Very Very Bad People.  We have no business impinging upon
> > APR's namespace in our code.

> Uh, what about those #ifndefs I mentioned?  (I accidentally wrote
> "#ifundef", perhaps that was confusing?  Sorry if so.)

Inadequate protection.  Subversion libraries and APR binaries might be
upgraded independently of each other, without recompilation.

(And what were we #ifdeffing on, anyway?  I don't think APR normally
#defines anything when it provides a new function.)

> We did this with the full knowledge of the APR developers, who
> welcomed it as a technique for testing & working the bugs out of new
> APIs before folding them into APR itself.

It's not really the APR authors who suffer.  It's users who might run
into library conflicts.


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

Re: Very basic traffic measurement for svnserve?

Posted by kf...@collab.net.
Greg Hudson <gh...@MIT.EDU> writes:
> On Mon, 2005-02-28 at 15:12, kfogel@collab.net wrote:
> > In the past, we've handled this situation by writing the APR
> > implementations in Subversion -- that is, putting functions whose
> > names begin with "apr_" into the Subversion code (protected by
> > #ifundef in the usual way).
> 
> That's totally unacceptable, and to the extend that we've done it in the
> past, we are Very Very Bad People.  We have no business impinging upon
> APR's namespace in our code.

Uh, what about those #ifndefs I mentioned?  (I accidentally wrote
"#ifundef", perhaps that was confusing?  Sorry if so.)

We did this with the full knowledge of the APR developers, who
welcomed it as a technique for testing & working the bugs out of new
APIs before folding them into APR itself.

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

Re: Very basic traffic measurement for svnserve?

Posted by Greg Hudson <gh...@MIT.EDU>.
On Mon, 2005-02-28 at 15:12, kfogel@collab.net wrote:
> In the past, we've handled this situation by writing the APR
> implementations in Subversion -- that is, putting functions whose
> names begin with "apr_" into the Subversion code (protected by
> #ifundef in the usual way).

That's totally unacceptable, and to the extend that we've done it in the
past, we are Very Very Bad People.  We have no business impinging upon
APR's namespace in our code.


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

Re: Very basic traffic measurement for svnserve?

Posted by kf...@collab.net.
Greg Hudson <gh...@MIT.EDU> writes:
> But I don't want svnserve handling that full complexity.  It's my
> position that apr and apr-util should be doing all the heavy lifting of
> writing a network daemon, and Subversion should simply be taking
> advantage of it.  There's already too much code in svnserve and ra_svn
> which isn't specific to Subversion.
> 
> Of course, actually extending apr and apr-util to do that heavy lifting
> requires careful design and no small amount of work.  So the current
> reality is that svnserve is a rather anemic daemon.

Hmmm.  You know...

In the past, we've handled this situation by writing the APR
implementations in Subversion -- that is, putting functions whose
names begin with "apr_" into the Subversion code (protected by
#ifundef in the usual way).  Then, when all the kinks are worked out,
we have code that's much closer to being droppable into APR/APU then
we otherwise would have had.

So factoring out some of this svnserve stuff now might make sense,
even if the factored out portion continues to live in the Subversion
repository for the time being.

Just a thought,
-Karl

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

Re: Very basic traffic measurement for svnserve?

Posted by Greg Hudson <gh...@MIT.EDU>.
On Mon, 2005-02-28 at 08:41, Ben Collins-Sussman wrote:
> Ugh.  We need to stay portable, and I'm dreading the thought of both 
> syslogd-specific Unix calls and win32-logging-API calls in our code.  
> Why not keep it simple?  Why not just write data to our own private 
> logfiles, just like apache does?  Is the problem really so complex that 
> we need to use OS-specific APIs?

It kinda is, if we want to do a good job.

But I don't want svnserve handling that full complexity.  It's my
position that apr and apr-util should be doing all the heavy lifting of
writing a network daemon, and Subversion should simply be taking
advantage of it.  There's already too much code in svnserve and ra_svn
which isn't specific to Subversion.

Of course, actually extending apr and apr-util to do that heavy lifting
requires careful design and no small amount of work.  So the current
reality is that svnserve is a rather anemic daemon.


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

Re: Very basic traffic measurement for svnserve?

Posted by Ben Collins-Sussman <su...@collab.net>.
On Feb 28, 2005, at 7:07 AM, Daniel Kastenholz wrote:

> Excuse me, but did I miss anyting? I haven't received any replies to 
> this topic except for one from Ben Collins-Sussmann. Where does this 
> one about the access hooks come from?

AFAICT, you've been explicitly cc'd on every mail in this thread.  
Here's the whole thread:

    http://svn.haxx.se/dev/archive-2005-02/1031.shtml

>
> As for the logging itself, I may not have a full overview yet, but I 
> suppose the best starting point is syslogd.
> Logging to a syslogd as a first step would significiantly ease the 
> other suggestions (e.g. Apache-style access_log and error_log), 
> provided that the installed syslogd is not 90's itself and provides 
> some sort of filtering mechanisms and output to different kinds of 
> destinations, as is the case with syslog-ng, for example.
> I'm not sure, though, to what extent such a solution would work under 
> Windows.

Ugh.  We need to stay portable, and I'm dreading the thought of both 
syslogd-specific Unix calls and win32-logging-API calls in our code.  
Why not keep it simple?  Why not just write data to our own private 
logfiles, just like apache does?  Is the problem really so complex that 
we need to use OS-specific APIs?

> Also, I haven't yet decided whether to build this logging feature only 
> into svnserve or make it accessible to the entire svn suite.

I think Karl Fogel said something like this in a different thread, and 
I agree with him:

If apache didn't already exist as one of our servers, I'd say, "go 
ahead and put logging functionality into the repository itself".  But 
because apache already exists and already does logging, I think makes 
more sense to go for the low-hanging fruit of adding something similar 
to svnserve.


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

Re: Very basic traffic measurement for svnserve?

Posted by Daniel Kastenholz <da...@in.tum.de>.
Excuse me, but did I miss anyting? I haven't received any replies to 
this topic except for one from Ben Collins-Sussmann. Where does this one 
about the access hooks come from?

Before this gets even more confusing, please note that I've been working 
on this issue during the last couple of days.
The traffic measurement feature that I originally suggested is already 
implemented and works fine, turned out to be just a couple of lines.

As for the logging itself, I may not have a full overview yet, but I 
suppose the best starting point is syslogd.
Logging to a syslogd as a first step would significiantly ease the other 
suggestions (e.g. Apache-style access_log and error_log), provided that 
the installed syslogd is not 90's itself and provides some sort of 
filtering mechanisms and output to different kinds of destinations, as 
is the case with syslog-ng, for example.
I'm not sure, though, to what extent such a solution would work under 
Windows.
Also, I haven't yet decided whether to build this logging feature only 
into svnserve or make it accessible to the entire svn suite. Both 
solutions need some considerations:
- to provide an effective logging for svnserve, the solution would need 
to be able to trace which meesage has been caused by which connection. 
Otherwise it doesn't make any sense, neither traffic measurement nor 
backtracking of the users' actions would be possible. That's why I've 
also introduced connection UUIDs in my working copy which are prepended 
to every line of output. The existing logging functions don't 
use/require that.
- on the other hand, would it be sensible to have to different logging 
mechanisms, one for svnserve and one for the rest of subversion? I don't 
think so. I guess it would be better to modify the existing SVN_ERR and 
thereby implement syslog output automatically wherever "normal" logging 
is done in current releases. No big deal.

As mentioned, I'm willing to implement this feature. Not that I'm not 
forbidding anyone else to work on this feature, but that person should 
know that it would be counter-productive for at least one of us. The 
thing is, I'm going to be on a business trip from today (leaving in 30 
minutes, to be precise), and for the next two weeks I won't be able to 
follow the discussion.

Daniel


First I thought it would be sensible to use the Apache logging 
functions, but then I noticed that this would require far more Apache 
sources to be included in Subversion than are at this time.

John Peacock schrieb:

> Brian W. Fitzpatrick wrote:
>
>> Would we really want to put the logging layer into svnserve?  I 
>> don't  have a solution in mind ATM, but it *would* be nice to see 
>> some generic  mechanism that could be configured to log the various 
>> commands run  against a repository... maybe something like an access 
>> hook or  something?
>
>
> As this gets discussed, please keep in mind that some of us would love 
> to run svnserve under daemontools:
>
>     http://cr.yp.to/daemontools.html
>
> so for that purpose, just writing all logging to stdout is wholy 
> sufficient.  In particular, I don't care about setting a log level 
> inside svnserve someplace; I can set multilog to filter (or even 
> split) the messages before writing to a file.
>
> John
>


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

Re: Very basic traffic measurement for svnserve?

Posted by Erik Huelsmann <e....@gmx.net>.
> > As this gets discussed, please keep in mind that some of us would love
> to run 
> > svnserve under daemontools:
> > 
> > 	http://cr.yp.to/daemontools.html
> > 
> > so for that purpose, just writing all logging to stdout is wholy
> sufficient.  In 
> > particular, I don't care about setting a log level inside svnserve
> someplace; I 
> > can set multilog to filter (or even split) the messages before writing
> to a file.
> 
> Oh, absolutely.  I certainly don't think that writing to stdout is an
> acceptable way for a daemon to do logging... at least not since the
> mid-90's.  :)

Dunno who's correct here, but he said it *is* sufficient...

bye,


Erik.

-- 
DSL Komplett von GMX +++ Superg�nstig und stressfrei einsteigen!
AKTION "Kein Einrichtungspreis" nutzen: http://www.gmx.net/de/go/dsl

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

Re: Very basic traffic measurement for svnserve?

Posted by John Peacock <jp...@rowman.com>.
Brian W. Fitzpatrick wrote:
> Ah!  Now I understand... sorry for my rude comment earlier.  I don't
> really have a problem with writing to stdout when running in the
> foreground, but who runs their daemons in the foreground?  I assume that
> the daemontools do?

It's only a daemon because you run it that way.  For me, it is simply a long 
running server process.  I won't argue the advantages to each mode with you. 
Just know that, to my mind, if svnserve is run in the foreground (for whatever 
reason), the only sane thing to do with log entries is to send them to stdout. 
It makes for efficient debugging, for no other reason.

> Well, I would advocate spending a bit of list time figuring out what
> needs to get logged where before we try to figure out how it gets
> logged.

Chicken, I'd like you to meet egg! ;-)  The discussion of how to structure a log 
framework leads inevitably to a good discussion of what gets logged and where. 
For example:

  - does logging happen at every level of the code (public vs. private) or does 
logging only happen at well defined layers

  - do we just add a logging callback to many/all of the composite data objects 
in the system, or just make it a single helper routine available from any module

  - do we define /a priori/ log levels (ala syslog) or do we let those evolve as 
the structure becomes defined (then map those internal levels to external 
levels, in the case of a syslog interface)

I had some of this discussion with Brane a couple of months ago; I'll see if I 
can find it in the archive.

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

Re: Very basic traffic measurement for svnserve?

Posted by Molle Bestefich <mo...@gmail.com>.
John Peacock wrote:
> Molle Bestefich wrote:
>> Do what everybody else does and output errors and warnings to:
>>
>> - Syslog if running on Unix
> 
> This is a slight exaggeration, since Apache (for example) has it's own logging
> subsystem and doesn't use Syslog at all (though I think you can make it use
> syslog if you want).  AFAIK, this is due to the known issues with classical
> syslog's behavior under extreme load.

File a bug against syslog-ng =)

>> - Eventlog if running on Windows (cmon, it's like 1-2 lines of code & it
>> makes you instantly compatible with what everybody else does)
> 
> Eventlog has it's own problems (like not including file rotation, so the log
> file can fill up).

The NT eventlog is very versatile, and there's a million tools out
there that will rotate, twist and turn and optionally suck every event
out of it and produce a neat report for you.  For every day use, you
can right-click a log in the viewer and choose "overwrite events as
needed", "overwrite old events", "don't overwrite".  If you want to
rotate the log, schedule a script that does this using eg. AT. 
Example log rotate script here (2nd example):
http://gethelp.devx.com/techtips/nt_pro/10_minute_solutions/10minNT0201-2.asp
There's a bunch of other sites that carry examples - it's basic WMI 101.

> There is no reason to limit _this_ project to a single logging scheme.  If the
> logging subsystem is pluggable, then it can support all of these schemes without
> bias towards any.

Sounds very reasonable.
Can't say I'd vote for stdout being the default on any system though :-)

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

Re: Very basic traffic measurement for svnserve?

Posted by John Peacock <jp...@rowman.com>.
Molle Bestefich wrote:
> Do what everybody else does and output errors and warnings to:
> 
> - Syslog if running on Unix

This is a slight exaggeration, since Apache (for example) has it's own logging
subsystem and doesn't use Syslog at all (though I think you can make it use 
syslog if you want).  AFAIK, this is due to the known issues with classical 
syslog's behavior under extreme load.

> - Eventlog if running on Windows (cmon, it's like 1-2 lines of code & it
> makes you instantly compatible with what everybody else does)

Eventlog has it's own problems (like not including file rotation, so the log 
file can fill up).

There is no reason to limit _this_ project to a single logging scheme.  If the 
logging subsystem is pluggable, then it can support all of these schemes without 
bias towards any.

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

Re: Very basic traffic measurement for svnserve?

Posted by Travis P <sv...@castle.fastmail.fm>.
On Feb 28, 2005, at 10:39 AM, Molle Bestefich wrote:

>  - Syslog if running on Unix

Does this work for users who may not be machine admins?
I think it's important for log messages to be viewed by
such non-administrative users.

Looks like is might be okay on OS X (each user id has a personal
console.log), but on AIX, it doesn't look like non-admins would
necessarily have access to the logs (though I could just not be
doing it right).

-Travis


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

Re: Very basic traffic measurement for svnserve?

Posted by Molle Bestefich <mo...@gmail.com>.
Do what everybody else does and output errors and warnings to:

 - Syslog if running on Unix
 - Eventlog if running on Windows (cmon, it's like 1-2 lines of code &
it makes you instantly compatible with what everybody else does)

Performance data in access_log format goes to a text file, and if
someone wants it on their stdout, they can do a 'tail -f' on it?

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

Re: Very basic traffic measurement for svnserve?

Posted by "Brian W. Fitzpatrick" <fi...@collab.net>.
On Mon, 2005-02-28 at 08:04 -0500, John Peacock wrote:
> Brian W. Fitzpatrick wrote:
> > Oh, absolutely.  I certainly don't think that writing to stdout is an
> > acceptable way for a daemon to do logging... at least not since the
> > mid-90's.  :)
> 
> Oh, now you're just making fun of me!

Actually, I'm not--I'm just usually not writing emails at 6:30AM, so I
misread your mail. :-/

> All I'm saying is if svnserve is run in the foreground (which makes it _not_ be 
> a daemon) it is perfectly acceptable to print to stdout.  In fact, it makes for 
> a very convenient way to decide what to log and to test that functionality as 
> you "logify" each section of code.

Ah!  Now I understand... sorry for my rude comment earlier.  I don't
really have a problem with writing to stdout when running in the
foreground, but who runs their daemons in the foreground?  I assume that
the daemontools do?

> I just don't want people to waste their time including a full syslog interface 
> until the scope of what gets logged is much more fully understood.

Well, I would advocate spending a bit of list time figuring out what
needs to get logged where before we try to figure out how it gets
logged.

-Fitz


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

Re: Very basic traffic measurement for svnserve?

Posted by John Peacock <jp...@rowman.com>.
Brian W. Fitzpatrick wrote:
> Oh, absolutely.  I certainly don't think that writing to stdout is an
> acceptable way for a daemon to do logging... at least not since the
> mid-90's.  :)

Oh, now you're just making fun of me!

All I'm saying is if svnserve is run in the foreground (which makes it _not_ be 
a daemon) it is perfectly acceptable to print to stdout.  In fact, it makes for 
a very convenient way to decide what to log and to test that functionality as 
you "logify" each section of code.

I just don't want people to waste their time including a full syslog interface 
until the scope of what gets logged is much more fully understood.

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

Re: Very basic traffic measurement for svnserve?

Posted by "Brian W. Fitzpatrick" <fi...@collab.net>.
On Mon, 2005-02-28 at 07:42 -0500, John Peacock wrote:
> Brian W. Fitzpatrick wrote:
> > Would we really want to put the logging layer into svnserve?  I don't  
> > have a solution in mind ATM, but it *would* be nice to see some generic  
> > mechanism that could be configured to log the various commands run  
> > against a repository... maybe something like an access hook or  something?
> 
> As this gets discussed, please keep in mind that some of us would love to run 
> svnserve under daemontools:
> 
> 	http://cr.yp.to/daemontools.html
> 
> so for that purpose, just writing all logging to stdout is wholy sufficient.  In 
> particular, I don't care about setting a log level inside svnserve someplace; I 
> can set multilog to filter (or even split) the messages before writing to a file.

Oh, absolutely.  I certainly don't think that writing to stdout is an
acceptable way for a daemon to do logging... at least not since the
mid-90's.  :)

-Fitz


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

Re: Very basic traffic measurement for svnserve?

Posted by John Peacock <jp...@rowman.com>.
Brian W. Fitzpatrick wrote:
> Would we really want to put the logging layer into svnserve?  I don't  
> have a solution in mind ATM, but it *would* be nice to see some generic  
> mechanism that could be configured to log the various commands run  
> against a repository... maybe something like an access hook or  something?

As this gets discussed, please keep in mind that some of us would love to run 
svnserve under daemontools:

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

so for that purpose, just writing all logging to stdout is wholy sufficient.  In 
particular, I don't care about setting a log level inside svnserve someplace; I 
can set multilog to filter (or even split) the messages before writing to a file.

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

Re: Very basic traffic measurement for svnserve?

Posted by John Peacock <jp...@rowman.com>.
Molle Bestefich wrote:
> MySQL runs on Linux and Windows, and it will log to the NT event log
> on service errors (as every other win32 service) on Win and at least
> it's own ascii logfile on unix boxes (probably syslog also?..).  Could
> perhaps serve as inspiration.  (Haven't even looked at the code though
> =)).

Read the MySQL licenses very carefully before going down that path; it is 
probably much more fruitful to try and abstract the Apache logger, since we know 
we are compatible with their license.  And the Apache/APR project, which we 
depend so heavily on, gains in the exchange.

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

Re: Very basic traffic measurement for svnserve?

Posted by Molle Bestefich <mo...@gmail.com>.
Branko Čibej wrote:
> Daniel, whatever you do, *please* don't try to invent yet another
> logging library. Use one of the millions that exist already; it must be
> protable (at least Unix and Windows), and it must be able to connect to
> syslog on Unix (but not _only_ to syslog).

MySQL runs on Linux and Windows, and it will log to the NT event log
on service errors (as every other win32 service) on Win and at least
it's own ascii logfile on unix boxes (probably syslog also?..).  Could
perhaps serve as inspiration.  (Haven't even looked at the code though
=)).

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


Re: Very basic traffic measurement for svnserve?

Posted by Branko Čibej <br...@xbc.nu>.
Brian W. Fitzpatrick wrote:

>
> On Feb 26, 2005, at 10:28 AM, Ben Collins-Sussman wrote:
>
>>
>> On Feb 26, 2005, at 6:43 AM, Daniel Kastenholz wrote:
>>
>>>
>>> Any architecture- or style-related suggestions, remarks, hints... ?
>>>
>>
>> I would very much like to see svnserve grow the equivalent of 
>> apache's  "accesslog" and "errorlog".  Many users have been asking 
>> for this.  I  don't imagine it would be tremendously difficult to do, 
>> but nobody's  had time to do it yet.
>>
>> By the way, the svnserve protocol is documented here in the  
>> libsvn_ra_svn/ dir:
>>
>>    http://svn.collab.net/repos/svn/trunk/subversion/libsvn_ra_svn/ 
>> protocol
>>
>> ...so I'd use that -- as well as svn_ra.h -- as your guidelines to  
>> understanding what's going on in terms of client/server requests.  
>> I'd  not only like to see a traffic counter being logged for each  
>> connection, but also each 'command' sent by the client being logged 
>> in  an accesslog.  And svnserve errors written to errorlog.
>>
>> If you have time to work on this, that's great.  Be sure to read  
>> HACKING to understand how to submit patches for review.  And be sure  
>> to work against svn's latest /trunk code, not some released tarball.
>
>
> Would we really want to put the logging layer into svnserve?  I don't  
> have a solution in mind ATM, but it *would* be nice to see some 
> generic  mechanism that could be configured to log the various 
> commands run  against a repository... maybe something like an access 
> hook or  something?

We talked about this a while ago. Yes, we should have both logging and 
debug tracing in our code eventually (and note that these are two 
entirely different things).

Daniel, whatever you do, *please* don't try to invent yet another 
logging library. Use one of the millions that exist already; it must be 
protable (at least Unix and Windows), and it must be able to connect to 
syslog on Unix (but not _only_ to syslog).

A good first step might be to take the logging code from Apache and 
making a separate library out if it (perhaps within APR?).

-- Brane



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

Re: Very basic traffic measurement for svnserve?

Posted by "Brian W. Fitzpatrick" <fi...@collab.net>.
On Feb 26, 2005, at 10:28 AM, Ben Collins-Sussman wrote:

>
> On Feb 26, 2005, at 6:43 AM, Daniel Kastenholz wrote:
>>
>> Any architecture- or style-related suggestions, remarks, hints... ?
>>
>
> I would very much like to see svnserve grow the equivalent of apache's  
> "accesslog" and "errorlog".  Many users have been asking for this.  I  
> don't imagine it would be tremendously difficult to do, but nobody's  
> had time to do it yet.
>
> By the way, the svnserve protocol is documented here in the  
> libsvn_ra_svn/ dir:
>
>    
> http://svn.collab.net/repos/svn/trunk/subversion/libsvn_ra_svn/ 
> protocol
>
> ...so I'd use that -- as well as svn_ra.h -- as your guidelines to  
> understanding what's going on in terms of client/server requests.  I'd  
> not only like to see a traffic counter being logged for each  
> connection, but also each 'command' sent by the client being logged in  
> an accesslog.  And svnserve errors written to errorlog.
>
> If you have time to work on this, that's great.  Be sure to read  
> HACKING to understand how to submit patches for review.  And be sure  
> to work against svn's latest /trunk code, not some released tarball.

Would we really want to put the logging layer into svnserve?  I don't  
have a solution in mind ATM, but it *would* be nice to see some generic  
mechanism that could be configured to log the various commands run  
against a repository... maybe something like an access hook or  
something?

-Fitz


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

Re: Very basic traffic measurement for svnserve?

Posted by Ben Collins-Sussman <su...@collab.net>.
On Feb 26, 2005, at 6:43 AM, Daniel Kastenholz wrote:
>
> Any architecture- or style-related suggestions, remarks, hints... ?
>

I would very much like to see svnserve grow the equivalent of apache's 
"accesslog" and "errorlog".  Many users have been asking for this.  I 
don't imagine it would be tremendously difficult to do, but nobody's 
had time to do it yet.

By the way, the svnserve protocol is documented here in the 
libsvn_ra_svn/ dir:

   
http://svn.collab.net/repos/svn/trunk/subversion/libsvn_ra_svn/protocol

...so I'd use that -- as well as svn_ra.h -- as your guidelines to 
understanding what's going on in terms of client/server requests.  I'd 
not only like to see a traffic counter being logged for each 
connection, but also each 'command' sent by the client being logged in 
an accesslog.  And svnserve errors written to errorlog.

If you have time to work on this, that's great.  Be sure to read 
HACKING to understand how to submit patches for review.  And be sure to 
work against svn's latest /trunk code, not some released tarball.


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