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(); }