Hey John. How you been? On Wed, 2008-03-26 at 18:53 -0300, Jonh Wendell wrote: > I'm writing a library and want to print debug messages, by using > g_debug() macro. Is there a way to hide them by default, and let the > caller app show it by using g_set_handler()? You might try g_log_set_default_handler() We just used it to good effect in the Java bindings to turn ERRORs and CRITICALs into Exceptions and throw 'em. Using that function call, then a handler which made some decisions based on severity, worked well. For cases where we don't do something special, we just passed the call to g_log_default_handler(). I can point you to the exact line in our code if you're interested further; just ask. AfC Sydney -- Andrew Frederick Cowie Operational Dynamics is an operations and engineering consultancy focusing on IT strategy, organizational architecture, systems review, and effective procedures for change management. We actively carry out research and development in these areas on behalf of our clients, and enable successful use of open source in their mission critical enterprises, worldwide. http://www.operationaldynamics.com/ Sydney New York Toronto London
Attachment:
signature.asc
Description: This is a digitally signed message part