[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnash-dev] Logging code

From: strk
Subject: [Gnash-dev] Logging code
Date: Mon, 7 Aug 2006 19:42:20 +0200

I've been thinking again about this, and mayne C++ stream
is not really a good idea.
The con is that every << is a new function call, and
it won't be easy to prepend WARNING, ERROR etc to the call.

On the other end, having a plain function call:

        log_this( ... )

Has the advantage of being easily undefined at preprocessing
time to completely remove debugging from runtime.

The only problem would be the variable args part.

What would you think about defining macros like:



etc.. for use in the code ?

The number would be for number of arguments, and the macros
would either call the corresponding (number-less) function
OR be undefined to remove debugging .

Comments ?


On Tue, Jul 25, 2006 at 04:15:52PM +0200, strk wrote:
> On Tue, Jul 25, 2006 at 08:09:12AM -0600, Rob Savoye wrote:
> >   We should be able to do that with the C++ debug support too. I
> > personally dislike using printf() debug stuff in a C++ program. Now I'd
> +1 on using C++ syntax. Still a stream-like thing like gbdlog << arg
> would again evaluate arg no matter what flags are used. Maybe the
> debugger functions should be templated, in which case I think we
> can obtain a near no-op in case no -v is given.
> --strk;
> _______________________________________________
> Gnash-dev mailing list
> address@hidden


 /"\    ASCII Ribbon Campaign
 \ /    Respect for low technology.
  X     Keep e-mail messages readable by any computer system.
 / \    Keep it ASCII. 

reply via email to

[Prev in Thread] Current Thread [Next in Thread]