[gnome-builder] support: log plugins and if they are loaded
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] support: log plugins and if they are loaded
- Date: Sun, 25 Jun 2017 23:13:57 +0000 (UTC)
commit ac0d773edc7ed417f93da9e795ac61dec5507d5c
Author: Christian Hergert <chergert redhat com>
Date: Sun Jun 25 16:13:32 2017 -0700
support: log plugins and if they are loaded
plugins/support/ide-support.c | 19 +++++++++++++++++++
1 files changed, 19 insertions(+), 0 deletions(-)
---
diff --git a/plugins/support/ide-support.c b/plugins/support/ide-support.c
index 64c592e..a1359a7 100644
--- a/plugins/support/ide-support.c
+++ b/plugins/support/ide-support.c
@@ -24,6 +24,7 @@
#include <gtk/gtk.h>
#include <ide.h>
#include <ide-build-ident.h>
+#include <libpeas/peas.h>
#include <string.h>
#include "ide-support.h"
@@ -50,6 +51,8 @@ counter_arena_foreach_cb (DzlCounter *counter,
gchar *
ide_get_support_log (void)
{
+ PeasEngine *engine = peas_engine_get_default ();
+ const GList *plugins;
GChecksum *checksum;
GDateTime *now;
GDateTime *started_at;
@@ -136,6 +139,22 @@ ide_get_support_log (void)
g_string_append (str, "\n");
/*
+ * Log the list of plugins and if they are enabled.
+ */
+ g_string_append (str, "[runtime.plugins]\n");
+ plugins = peas_engine_get_plugin_list (engine);
+ for (const GList *iter = plugins; iter; iter = iter->next)
+ {
+ const PeasPluginInfo *info = iter->data;
+ const gchar *name = peas_plugin_info_get_module_name (info);
+
+ g_string_append_printf (str, "%s = %s\n",
+ name,
+ peas_plugin_info_is_loaded (info) ? "loaded" : "unloaded");
+ }
+ g_string_append (str, "\n");
+
+ /*
* Log the environment variables.
*/
g_string_append (str, "[runtime.environ]\n");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]