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



Daniel P. Berrange wrote:
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.

I don't really see that as a downside, but rather as a feature. I don't think users should interact directly with a library in general.

However, this is a debug feature, so maybe an environmental variable would be reasonable...

- 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);

I really dislike when libraries do this. It just makes it harder for the next library that's trying to use gtk-vnc. Plus, it's almost impossible to get the --help text right.

Regards,

Anthony Liguori





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