Re: [gtk-vnc-devel] [patch] debug messages revisited



On Thu, Mar 27, 2008 at 05:29:11PM -0300, Jonh Wendell wrote:
> Hi, guys.
> 
> Here it's the rewriting of debug log messages.
> 
> - Now, debug framework is enabled by default in configure stage.
> - Messages are only generated when the new function
> vnc_display_enable_debug(TRUE) is called.

The downside of this is that every application will provide a differnet
way to turn this on/off. I'd rather like to have a generic environment
variable, or command line arg applying to all apps using GTK-VNC.

> - If the app just wants to show the messages, it's enough to call that
> function. If it wants to have more control of the messages, it can call
> g_log_set_handler("gtk-vnc",G_LOG_LEVEL_DEBUG,handler_function,data).

I was looking at the way we initialize gtkglext the other day and it
occurs to me that perhaps we ought to have a generic API:

   vnc_display_init(int argc, char **argv);

and from that we can call gtk_gl_init_check() and actually be able to
give it a meaningful argv, instead of NULL, so gtkglext's command line
args get processed correctly.

We could then process a --gtk-vnc-debug  comanmd line argument outselves.
And at the same time, we could check for a GTK_VNC_DEBUG=1  environment
variable in vnc_display_init() to determine whether to turn on debug
or not.

Regards,
Dan.
-- 
|: Red Hat, Engineering, Boston   -o-   http://people.redhat.com/berrange/ :|
|: http://libvirt.org  -o-  http://virt-manager.org  -o-  http://ovirt.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505  -o-  F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|




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