summaryrefslogtreecommitdiffstats
path: root/bindings/python/wrapper_bottom.c
diff options
context:
space:
mode:
authorBenjamin Dauvergne <bdauvergne@entrouvert.com>2010-06-09 16:54:50 +0000
committerBenjamin Dauvergne <bdauvergne@entrouvert.com>2010-06-09 16:54:50 +0000
commit05b537876bd1ec9fc5f34312835de4ae04e7de68 (patch)
treecba591ebd3b751d2d8466693b5dd5bcbb398c7ad /bindings/python/wrapper_bottom.c
parent80a930cc3775f1f12d1cd04e8836f49c97b60a6c (diff)
downloadlasso-05b537876bd1ec9fc5f34312835de4ae04e7de68.tar.gz
lasso-05b537876bd1ec9fc5f34312835de4ae04e7de68.tar.xz
lasso-05b537876bd1ec9fc5f34312835de4ae04e7de68.zip
Binding python: add GLog handler to redirect logs to Python logger named "lasso"
* fixes #20
Diffstat (limited to 'bindings/python/wrapper_bottom.c')
-rw-r--r--bindings/python/wrapper_bottom.c2
1 files changed, 2 insertions, 0 deletions
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);
}