[goffice] debug
- From: Morten Welinder <mortenw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [goffice] debug
- Date: Sun, 4 Dec 2011 23:58:41 +0000 (UTC)
commit 517797b36f08d880a8d492410bff8b46cebe8f52
Author: Morten Welinder <terra gnome org>
Date: Sun Dec 4 18:58:31 2011 -0500
debug
goffice/app/go-plugin-loader-module.c | 19 ++++++++++++++++---
1 files changed, 16 insertions(+), 3 deletions(-)
---
diff --git a/goffice/app/go-plugin-loader-module.c b/goffice/app/go-plugin-loader-module.c
index 1a379cf..0a17838 100644
--- a/goffice/app/go-plugin-loader-module.c
+++ b/goffice/app/go-plugin-loader-module.c
@@ -109,8 +109,8 @@ go_plugin_loader_module_load_base (GOPluginLoader *loader, GOErrorInfo **err)
go_plugin_loader_get_plugin (loader)),
loader_module->module_file_name, NULL);
- if (go_debug_flag ("modules"))
- g_printerr ("Trying to load module file %s\n",
+ if (go_debug_flag ("plugin"))
+ g_printerr ("Loading module file %s\n",
full_module_file_name);
handle = g_module_open (full_module_file_name, G_MODULE_BIND_LAZY);
@@ -138,8 +138,11 @@ go_plugin_loader_module_load_base (GOPluginLoader *loader, GOErrorInfo **err)
(loader_module->plugin_init) (go_plugin_loader_get_plugin (loader), NULL);
}
- if (*err != NULL)
+ if (*err != NULL) {
+ if (go_debug_flag ("plugin"))
+ g_printerr ("Error while loading module\n");
g_module_close (handle);
+ }
}
g_free (full_module_file_name);
}
@@ -153,6 +156,16 @@ go_plugin_loader_module_unload_base (GOPluginLoader *loader, GOErrorInfo **ret_e
if (loader_module->plugin_shutdown != NULL) {
loader_module->plugin_shutdown (go_plugin_loader_get_plugin (loader), NULL);
}
+ if (go_debug_flag ("plugin")) {
+ char *full_module_file_name =
+ g_build_filename
+ (go_plugin_get_dir_name (go_plugin_loader_get_plugin (loader)),
+ loader_module->module_file_name,
+ NULL);
+
+ g_printerr ("Unloading %s\n", full_module_file_name);
+ g_free (full_module_file_name);
+ }
if (!g_module_close (loader_module->handle)) {
*ret_error = go_error_info_new_printf (
_("Unable to close module file \"%s\"."),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]