mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-21 08:04:26 +01:00
cln-plugin: Prep the logging payload in a let
I wanted to debug why we weren't getting some log messages, and this makes that a bit easier in future.
This commit is contained in:
@@ -63,15 +63,13 @@ where
|
||||
// errors when forwarding. Forwarding could break due to
|
||||
// an interrupted connection or stdout being closed, but
|
||||
// keeping the messages in the queue is a memory leak.
|
||||
let _ = out
|
||||
.lock()
|
||||
.await
|
||||
.send(json!({
|
||||
"jsonrpc": "2.0",
|
||||
"method": "log",
|
||||
"params": i
|
||||
}))
|
||||
.await;
|
||||
let payload = json!({
|
||||
"jsonrpc": "2.0",
|
||||
"method": "log",
|
||||
"params": i
|
||||
});
|
||||
|
||||
let _ = out.lock().await.send(payload).await;
|
||||
}
|
||||
});
|
||||
log::set_boxed_logger(Box::new(PluginLogger { sender, filter }))
|
||||
|
||||
Reference in New Issue
Block a user