From 05b537876bd1ec9fc5f34312835de4ae04e7de68 Mon Sep 17 00:00:00 2001 From: Benjamin Dauvergne Date: Wed, 9 Jun 2010 16:54:50 +0000 Subject: Binding python: add GLog handler to redirect logs to Python logger named "lasso" * fixes #20 --- bindings/python/wrapper_bottom.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'bindings/python/wrapper_bottom.c') diff --git a/bindings/python/wrapper_bottom.c b/bindings/python/wrapper_bottom.c index 51de44b0..a899188d 100644 --- a/bindings/python/wrapper_bottom.c +++ b/bindings/python/wrapper_bottom.c @@ -14,5 +14,7 @@ init_lasso(void) Py_INCREF(&PyGObjectPtrType); PyModule_AddObject(m, "PyGObjectPtr", (PyObject *)&PyGObjectPtrType); + lasso_log_set_handler(G_LOG_FLAG_FATAL | G_LOG_FLAG_RECURSION | G_LOG_LEVEL_MASK, + lasso_python_log, NULL); } -- cgit