[evolution-data-server] e-module: Add debug prints about module loading
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server] e-module: Add debug prints about module loading
- Date: Wed, 27 Apr 2022 14:03:51 +0000 (UTC)
commit 6a4d809b990c85993a49bb1263666e0dd98e8aca
Author: Milan Crha <mcrha redhat com>
Date: Wed Apr 27 16:02:57 2022 +0200
e-module: Add debug prints about module loading
This can help to see where the modules are expected.
src/libedataserver/e-module.c | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
---
diff --git a/src/libedataserver/e-module.c b/src/libedataserver/e-module.c
index 0ef8270e2..d5701ec1e 100644
--- a/src/libedataserver/e-module.c
+++ b/src/libedataserver/e-module.c
@@ -280,12 +280,14 @@ e_module_load_all_in_directory (const gchar *dirname)
g_return_val_if_fail (dirname != NULL, NULL);
- if (!g_module_supported ())
+ if (!g_module_supported ()) {
+ e_source_registry_debug_print ("Cannot load *." G_MODULE_SUFFIX " in '%s': modules not
supported by glib\n", dirname);
return NULL;
+ }
dir = g_dir_open (dirname, 0, &error);
if (dir == NULL) {
- g_debug ("%s: %s", G_STRFUNC, error ? error->message : "Unknown error");
+ e_source_registry_debug_print ("Cannot open module dir '%s': %s\n", dirname, error ?
error->message : "Unknown error");
g_clear_error (&error);
return NULL;
}
@@ -294,8 +296,10 @@ e_module_load_all_in_directory (const gchar *dirname)
EModule *module;
gchar *filename;
- if (!g_str_has_suffix (basename, "." G_MODULE_SUFFIX))
+ if (!g_str_has_suffix (basename, "." G_MODULE_SUFFIX)) {
+ e_source_registry_debug_print ("Skipping file '%s/%s': incorrect extension\n",
dirname, basename);
continue;
+ }
filename = g_build_filename (dirname, basename, NULL);
@@ -307,6 +311,8 @@ e_module_load_all_in_directory (const gchar *dirname)
loaded_modules = g_list_prepend (loaded_modules, module);
}
+ e_source_registry_debug_print ("Loaded %u *." G_MODULE_SUFFIX " modules in '%s'\n", g_list_length
(loaded_modules), dirname);
+
g_dir_close (dir);
return loaded_modules;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]