mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-02-22 14:42:40 +01:00
lightningd: log if builtin plugin fails to start
Lightningd should log if a builtin plugin fails to start instead of silently skip over it. Changelog-Add: log message if builtin plugin fails to start. Signed-off-by: Lagrang3 <lagrang3@protonmail.com>
This commit is contained in:
parent
78b9ccf432
commit
2bd9c2285a
1 changed files with 13 additions and 8 deletions
|
@ -2536,14 +2536,19 @@ void plugins_set_builtin_plugins_dir(struct plugins *plugins,
|
||||||
const char *dir)
|
const char *dir)
|
||||||
{
|
{
|
||||||
/*~ Load the builtin plugins as important. */
|
/*~ Load the builtin plugins as important. */
|
||||||
for (size_t i = 0; list_of_builtin_plugins[i]; ++i)
|
for (size_t i = 0; list_of_builtin_plugins[i]; ++i) {
|
||||||
plugin_register(plugins,
|
struct plugin *p = plugin_register(
|
||||||
take(path_join(NULL, dir,
|
plugins,
|
||||||
list_of_builtin_plugins[i])),
|
take(path_join(NULL, dir, list_of_builtin_plugins[i])),
|
||||||
NULL,
|
NULL,
|
||||||
/* important = */
|
/* important = */
|
||||||
!streq(list_of_builtin_plugins[i], "cln-renepay"),
|
!streq(list_of_builtin_plugins[i], "cln-renepay"), NULL,
|
||||||
NULL, NULL);
|
NULL);
|
||||||
|
if (!p)
|
||||||
|
log_unusual(
|
||||||
|
plugins->log, "failed to register plugin %s",
|
||||||
|
path_join(tmpctx, dir, list_of_builtin_plugins[i]));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void shutdown_plugins(struct lightningd *ld)
|
void shutdown_plugins(struct lightningd *ld)
|
||||||
|
|
Loading…
Add table
Reference in a new issue