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

Re: libsvn_repos logging -- design problems

From: John Peacock <jpeacock_at_rowman.com>
Date: 2005-07-15 18:28:04 CEST

Ben Collins-Sussman wrote:
>
> What is a 'logger'? A whole new svn-logging-daemon process?

Not necessarily, but certainly a new library. I only meant that there
was a single public function which was called with an object that
contained the information about how the logging was actually being
accomplished. I'm just saying make your API mostly private and create a
log baton that contains the details.

Something like this:

typedef struct svn_log_baton_t
{
   svn_repos_t *repos;
   svn_repos_loglevel_t loglevel;
   svn_stream_t **errlogfile;
   svn_stream_t **accesslogfile;
   /* other elements as seem useful */
} svn_log_baton_t;

Then your calls to svn_repos_write_accesslog() et al swap the
svn_repos_t for a svn_log_baton_t. All of the calls to
svn_repos_[get|set]_[error|access]log then become private to log library.

John

-- 
John Peacock
Director of Information Research and Technology
Rowman & Littlefield Publishing Group
4501 Forbes Boulevard
Suite H
Lanham, MD  20706
301-459-3366 x.5010
fax 301-429-5748
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Jul 15 18:28:30 2005

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