diff options
Diffstat (limited to 'src/libstrongswan/plugins')
-rw-r--r-- | src/libstrongswan/plugins/plugin_loader.c | 10 | ||||
-rw-r--r-- | src/libstrongswan/plugins/plugin_loader.h | 8 |
2 files changed, 18 insertions, 0 deletions
diff --git a/src/libstrongswan/plugins/plugin_loader.c b/src/libstrongswan/plugins/plugin_loader.c index 2c8eae988..26310645b 100644 --- a/src/libstrongswan/plugins/plugin_loader.c +++ b/src/libstrongswan/plugins/plugin_loader.c @@ -1082,6 +1082,15 @@ METHOD(plugin_loader_t, loaded_plugins, char*, return this->loaded_plugins ?: ""; } +METHOD(plugin_loader_t, status, void, + private_plugin_loader_t *this, level_t level) +{ + if (this->loaded_plugins) + { + dbg(DBG_LIB, level, "loaded plugins: %s", this->loaded_plugins); + } +} + METHOD(plugin_loader_t, destroy, void, private_plugin_loader_t *this) { @@ -1109,6 +1118,7 @@ plugin_loader_t *plugin_loader_create() .create_plugin_enumerator = _create_plugin_enumerator, .has_feature = _has_feature, .loaded_plugins = _loaded_plugins, + .status = _status, .destroy = _destroy, }, .plugins = linked_list_create(), diff --git a/src/libstrongswan/plugins/plugin_loader.h b/src/libstrongswan/plugins/plugin_loader.h index 6bb9d6e75..d4f74b923 100644 --- a/src/libstrongswan/plugins/plugin_loader.h +++ b/src/libstrongswan/plugins/plugin_loader.h @@ -25,6 +25,7 @@ typedef struct plugin_loader_t plugin_loader_t; #include <collections/enumerator.h> +#include <utils/debug.h> /* to avoid circular references we can't include plugin_feature.h */ struct plugin_feature_t; @@ -110,6 +111,13 @@ struct plugin_loader_t { char* (*loaded_plugins)(plugin_loader_t *this); /** + * Log status about loaded plugins and features. + * + * @param level log level to use + */ + void (*status)(plugin_loader_t *this, level_t level); + + /** * Unload loaded plugins, destroy plugin_loader instance. */ void (*destroy)(plugin_loader_t *this); |