On Monday, November 21, 2011 5:45 PM, "Philip Martin" <[email protected]> wrote: > [email protected] writes: > > > Author: philip > > Date: Mon Nov 21 17:24:10 2011 > > New Revision: 1204610 > > > > URL: http://svn.apache.org/viewvc?rev=1204610&view=rev > > Log: > > * subversion/mod_dav_svn/repos.c (log_warning): Log all errors in chain so > > that the underlying cause of the error is recorded. > > > > Modified: > > subversion/trunk/subversion/mod_dav_svn/repos.c > > > > Modified: subversion/trunk/subversion/mod_dav_svn/repos.c > > URL: > > http://svn.apache.org/viewvc/subversion/trunk/subversion/mod_dav_svn/repos.c?rev=1204610&r1=1204609&r2=1204610&view=diff > > ============================================================================== > > --- subversion/trunk/subversion/mod_dav_svn/repos.c (original) > > +++ subversion/trunk/subversion/mod_dav_svn/repos.c Mon Nov 21 17:24:10 2011 > > @@ -1170,7 +1170,11 @@ static void log_warning(void *baton, svn > > ### of our functions ... ?? > > */ > > > > - ap_log_rerror(APLOG_MARK, APLOG_ERR, APR_EGENERAL, r, "%s", > > err->message); > > + while (err) > > + { > > + ap_log_rerror(APLOG_MARK, APLOG_ERR, APR_EGENERAL, r, "%s", > > err->message); > > + err = err->child; > > + } > > } > > I'm wondering whether this is correct. Should it skip duplicates like > svn_handle_error2? Should it use svn_err_best_message like > svnserve/serve.c:log_error?
Using svn_err_best_message() would DTRT when err->message is NULL. Filtering duplicates would be nice. (I'm thinking of multiple processes logging to the same file; it would surely make the file more readable if each process didn't repeat a given message N times.) Perhaps some logic from svn_handle_error2() could be reused? > > -- > Philip >

