plugin: debug activation & deactivation

This commit is contained in:
George Kiagiadakis 2021-01-20 16:21:20 +02:00
parent 997e2c7539
commit e9c38f365e
2 changed files with 5 additions and 1 deletions

View file

@ -14,6 +14,7 @@
#define G_LOG_DOMAIN "wp-plugin"
#include "plugin.h"
#include "debug.h"
#include "private/registry.h"
enum {
@ -215,6 +216,8 @@ wp_plugin_activate (WpPlugin * self)
g_return_if_fail (WP_IS_PLUGIN (self));
g_return_if_fail (WP_PLUGIN_GET_CLASS (self)->activate);
wp_info_object (self, "activating plugin '%s'", wp_plugin_get_name (self));
WP_PLUGIN_GET_CLASS (self)->activate (self);
}
@ -231,5 +234,7 @@ wp_plugin_deactivate (WpPlugin * self)
g_return_if_fail (WP_IS_PLUGIN (self));
g_return_if_fail (WP_PLUGIN_GET_CLASS (self)->deactivate);
wp_info_object (self, "deactivating plugin '%s'", wp_plugin_get_name (self));
WP_PLUGIN_GET_CLASS (self)->deactivate (self);
}

View file

@ -73,7 +73,6 @@ signal_handler (gpointer data)
static void
on_plugin_added (WpObjectManager * om, WpPlugin * p, struct WpDaemonData *d)
{
wp_info ("Activating plugin " WP_OBJECT_FORMAT, WP_OBJECT_ARGS (p));
wp_plugin_activate (p);
}