From 8c660ad828ccf8e00c0ab1ce5dc9a53ff7103e6d Mon Sep 17 00:00:00 2001 From: link2xt Date: Fri, 20 Jan 2023 13:27:19 +0000 Subject: [PATCH] Explicitly emit INFO events in stop_io() --- src/accounts.rs | 2 +- src/scheduler.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/accounts.rs b/src/accounts.rs index f81c9a7ca..5a40b8cdd 100644 --- a/src/accounts.rs +++ b/src/accounts.rs @@ -262,7 +262,7 @@ impl Accounts { pub async fn stop_io(&self) { // Sending an event here wakes up event loop even // if there are no accounts. - info!(self, "Stopping IO for all accounts."); + self.emit_event(EventType::Info("Stopping IO for all accounts.".to_string())); for account in self.accounts.values() { account.stop_io().await; } diff --git a/src/scheduler.rs b/src/scheduler.rs index 8d8118dd8..836069fbf 100644 --- a/src/scheduler.rs +++ b/src/scheduler.rs @@ -79,7 +79,7 @@ impl SchedulerState { // For this, the caller needs to instruct the event poller // to terminate on receiving the next event and then call stop_io() // which will emit the below event(s) - info!(context, "stopping IO"); + context.emit_event(EventType::Info("Stopping IO.".to_string())); if let Some(debug_logging) = context.debug_logging.read().await.as_ref() { debug_logging.loop_handle.abort(); }