mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-02-21 22:31:48 +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)
|
||||
{
|
||||
/*~ Load the builtin plugins as important. */
|
||||
for (size_t i = 0; list_of_builtin_plugins[i]; ++i)
|
||||
plugin_register(plugins,
|
||||
take(path_join(NULL, dir,
|
||||
list_of_builtin_plugins[i])),
|
||||
NULL,
|
||||
/* important = */
|
||||
!streq(list_of_builtin_plugins[i], "cln-renepay"),
|
||||
NULL, NULL);
|
||||
for (size_t i = 0; list_of_builtin_plugins[i]; ++i) {
|
||||
struct plugin *p = plugin_register(
|
||||
plugins,
|
||||
take(path_join(NULL, dir, list_of_builtin_plugins[i])),
|
||||
NULL,
|
||||
/* important = */
|
||||
!streq(list_of_builtin_plugins[i], "cln-renepay"), 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)
|
||||
|
|
Loading…
Add table
Reference in a new issue