-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GUI: Daemon "info" level logs when starting it #475
Comments
5c87937 Add more bitcoind-related setup logging (Antoine Poinsot) Pull request description: At startup it sometimes appear we may be hanging when setting up bitcoind. Add more logging to give more information about what's taking long to setup (for instance, loading the watchonly wallet). Related to #475. ACKs for top commit: darosior: ACK 5c87937 Tree-SHA512: 75c553cabf545d57a5fc2d251e5b4cd880a931a408c6f1b1052067f2ccc8e0728ad779f30de5a88c2566f9e67ac085b713393ee4fa193331e49c3a8e6112ecc8
I'm not sure how best to approach this. Would it be reading the |
I was thinking of a log dispatcher, but i'm not sure either. @edouardparis any idea? |
The way I see it, in struct LogStream {
sender: mpsc::Sender<String>,
}
impl<S> Layer<S> for LogStream
where
S: Subscriber + for<'a> tracing_subscriber::registry::LookupSpan<'a>,
{
fn on_event(&self, event: &Event<'_>, _ctx: Context<'_, S>) {
if let Some(message) = event.message().map(ToString::to_string) {
let _ = self.sender.send(message);
}
}
} let (sender, receiver) = mpsc::channel::<String>();
tracing_subscriber::registry().with(LogStream{ sender }); the mpsc channel receiver is then passed to loader to listen from it in a subscription. |
If that's too convoluted, not doing it is also an option. |
Thanks very much for the suggestion. I'll give that a try and see how it goes. |
I've been able to make progress and display some log output on the screen. Once I've tidied things up, I'll create a draft PR to get initial feedback. |
Ok, thanks for the update. |
I've created #748 for some initial feedback to make sure I'm on the right track. Thanks. |
On mainnet it takes a few minutes for my
bitcoind
to load the watchonly wallet. Therefore the GUI stays stuck at the following screen with no apparent progress.I think it would be nice to display the daemon info-level logs to let the user know there is actual progress.
The text was updated successfully, but these errors were encountered: