On Fri, 2007-02-09 at 13:41 -0500, Josh Sled wrote: > On Fri, 2007-02-09 at 13:10 -0500, Derek Atkins wrote: > > Quoting Josh Sled <[EMAIL PROTECTED]>: > > > > [snip] > > > The space-based indentation as per ENTER/LEAVE has been disabled. > > > Before, the {in,de}dent calls were conditional on qof_log_check, but > > > that no longer exists. I'm pretty sure it can fit back in by creating > > > two new log levels... but I'd like to hear feedback first? I personally > > > don't find it useful, but I think others do, and it's a pretty big > > > regression. > > > > I personally like this functionality and would miss it if it's gone > > for good. It's EXTREMELY useful when you're trying to trace the > > program to see when you get out of a particular call tree by > > looking at the indentation level. It's most helpful when you have > > a re-entrant function. > > *nod* I'll work to restore this functionality.
This is back (r15539). As penance for breaking it in the first place, I started to go through the sources ensuring the balance on ENTER/LEAVE pairs. One of the problem is that mismatched pairs end up leaving the current indent counter floating at some absurdly high value; on a run just now, the last log statement has 904 spaces (226 indents). :/ But after going through a fraction of the uses, I decided to stop. Generally doing this stuff in a language without structured exception handling is hard, but in particular, the g_return{,_val}_if_fail construct makes it a bit more painful. To that end, I've added gnc_leave_return{,_val}_if_fail macros to qoflog.h, and even used them in a few places, but they're not ideal ... you can't set the message of the LEAVE, for example. In any case, someone should still go through and audit the balance of ENTER/LEAVE statements. At worst because it's the Right Thing to do, but also because mis-matched pairs can (pretty early on) render the indentation level confusing or maybe misleading ... :/ Also, I removed the TRACE and DETAIL levels, the DEBUGCMD macro, and some other unused stuff. -- ...jsled http://asynchronous.org/ - a=jsled;b=asynchronous.org;echo [EMAIL PROTECTED]
signature.asc
Description: This is a digitally signed message part
_______________________________________________ gnucash-devel mailing list gnucash-devel@gnucash.org https://lists.gnucash.org/mailman/listinfo/gnucash-devel