Skip to content

cln_plugin: consider not unwrapping sends to logging channel #6039

@justinmoon

Description

@justinmoon

I'm trying to get Fedimint's plugin to shutdown cleanly when lightningd is killed.

In order to debug this, I tried adding an additional logging subscriber which logs to a file. This could be helpful for debugging when core-lightning's JSON-RPC logging fails (e.g. after lightningd has been killed). But this unwrap causes a panic which prevents this strategy from working.

In this instance, it would be nice if cln_plugin didn't panic here. But I can see how the panic could be helpful in other circumstances -- e.g. when logging isn't configured properly and the program should just crash. And at this point there isn't a way for just log an error instead of panicking because the logging mechanism itself has failed ...

Metadata

Metadata

Assignees

No one assigned

    Labels

    rustIssue related to rust

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions