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

Re: Logging: home-grown mechanism or syslog/event-log?

From: Greg Hudson <ghudson_at_MIT.EDU>
Date: 2005-07-21 05:51:00 CEST

On Wed, 2005-07-20 at 22:27 -0500, Ben Collins-Sussman wrote:
> In libsvn_subr, this is just a filtered stream, nothing more. A
> "logger" object just contains an svn_stream_t to write to, and
> loglevel to control the writing.

How does the receiving string know when one log message ends and another
one begins?

"Each log message comes in a different svn_stream_write() call" is the
wrong answer; svn_stream_t objects are supposed to be byte streams, not
datagram streams. A function like svn_stream_printf() could be
implemented so that it makes one call to svn_stream_write() with all the
result, or many calls, and the recipient is supposed to behave in the
same fashion.

"Each log message ends with a newline" is a valid answer, but it's not a
very convenient one, and we'd have to be careful whenever logging
variable data to make sure that it contains no newlines.

So, I don't think svn_stream_t is the right abstraction. Maybe just a
function which takes a const char * and a pool.

To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Jul 21 05:52:40 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.