gnash-dev
[Top][All Lists]
Advanced

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

Re: [Gnash-dev] Logging code


From: Rob Savoye
Subject: Re: [Gnash-dev] Logging code
Date: Mon, 07 Aug 2006 12:55:49 -0600
User-agent: Thunderbird 1.5.0.4 (X11/20060614)

strk wrote:
> I've been thinking again about this, and mayne C++ stream
> is not really a good idea.

  Performance wise using streams is always a bad idea, but it's very
useful for debug logs in C++ programs because it can print C++ objects
directly. The advantages of a C API for debug logging are simplicity,
but I get really tired of having to convert everything to something that
can be printed by printf().

> The con is that every << is a new function call, and
> it won't be easy to prepend WARNING, ERROR etc to the call.

  The idea was to have a class derived from LogFile for warning, errors,
etc ... so you'd use "errlog << foo" or something like that. I'll admit
I'd like to see the current debug logging system improved in some way to
handle errors and warnings, plus to be more performance oriented.

  We could wrap all the debugging in a macro like IF_ACTION() was before
I changed it that would remove those statements. I think a multitude of
macros with variables arguments is a mess. One advantage of the varargs
or streaming is you can print as much as you want.

        - rob -






reply via email to

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