Re: __FUNCTION__ and debug.

From: Adrian Chadd <adrian@dont-contact.us>
Date: Sat, 26 Oct 2002 22:02:58 -0600

On Sat, Oct 26, 2002, Robert Collins wrote:
> I'd like to introduce a new debug api:
>
> trace(section, level)(const char *format, ...);
>
> This will over time replace debug() as the primary debugging output
> tool.
>
> trace will have the following semantics:
> It will prepend the __FUNCTION__ macro to the format string:
> ie "Can't lock foo" in somefunc() will output as
> "somefunc: Can't lock foo".
>
> It won't enforce, but also won't support, embedded \n characters.
>
> Any objections or minor tweaks?

Right. Hm. Are there any reasons why we'd want to _not_ have a single
trace call map to a single debug line? I can't think of any, but
ISTR some magical stuff in some file which used it for formatting.
I could be wrong.

Should we call it debug_trace() or something a little more descriptive?
trace() might sound like it has stack traces with it or something. :)

Adrian
Received on Sat Oct 26 2002 - 22:03:00 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:17:01 MST