diff --git a/mutiny-core/src/lib.rs b/mutiny-core/src/lib.rs index ad61b05fc..1e96c6d52 100644 --- a/mutiny-core/src/lib.rs +++ b/mutiny-core/src/lib.rs @@ -1625,7 +1625,7 @@ impl MutinyWallet { /// Stops all of the nodes and background processes. /// Returns after node has been stopped. pub async fn stop(&mut self) -> Result<(), MutinyError> { - log_trace!(self.logger, "calling stop"); + log_debug!(self.logger, "calling stop"); let node_manager = self.node_manager.take().ok_or(MutinyError::NotRunning)?; @@ -1633,7 +1633,7 @@ impl MutinyWallet { // store wallet { - log_trace!(self.logger, "save wallet state"); + log_debug!(self.logger, "save wallet state"); let mut wallet = node_manager .wallet .wallet @@ -1644,22 +1644,20 @@ impl MutinyWallet { } } - log_trace!(self.logger, "release device lock"); + log_debug!(self.logger, "release device lock"); // stop device lock self.device_lock_stop_handle.stop().await; - log_trace!(self.logger, "stop logger"); + log_debug!(self.logger, "stop logger"); // stop logger self.logger.stop().await; // stop the indexeddb object to close db connection if self.storage.connected().unwrap_or(false) { - log_debug!(self.logger, "stopping storage"); self.storage.stop().await; - log_debug!(self.logger, "stopped storage"); } - log_trace!(self.logger, "finished calling stop"); + log_debug!(self.logger, "finished calling stop"); Ok(()) } @@ -1728,7 +1726,7 @@ impl MutinyWallet { /// Deletes all the storage pub async fn delete_all(&self) -> Result<(), MutinyError> { - log_trace!(self.logger, "calling delete_all"); + log_debug!(self.logger, "calling delete_all"); if self.node_manager.is_some() { return Err(MutinyError::AlreadyRunning); } @@ -1736,7 +1734,7 @@ impl MutinyWallet { self.storage.stop().await; self.storage.delete_all().await?; - log_trace!(self.logger, "finished calling delete_all"); + log_debug!(self.logger, "finished calling delete_all"); Ok(()) } diff --git a/mutiny-wasm/src/indexed_db.rs b/mutiny-wasm/src/indexed_db.rs index d12cce8af..c4a777c84 100644 --- a/mutiny-wasm/src/indexed_db.rs +++ b/mutiny-wasm/src/indexed_db.rs @@ -778,6 +778,7 @@ impl MutinyStorage for IndexedDbStorage { } async fn start(&mut self) -> Result<(), MutinyError> { + log_debug!(self.logger, "starting storage"); let indexed_db = if self.indexed_db.try_read()?.0.is_none() { Arc::new(RwLock::new(RexieContainer(Some( Self::build_indexed_db_database().await?, @@ -797,6 +798,7 @@ impl MutinyStorage for IndexedDbStorage { let memory = Arc::new(RwLock::new(map)); self.indexed_db = indexed_db; self.memory = memory; + log_debug!(self.logger, "started storage"); Ok(()) } @@ -816,6 +818,7 @@ impl MutinyStorage for IndexedDbStorage { } async fn stop(&self) { + log_debug!(self.logger, "stopping storage"); // Wait all back ground tasks self.tasks.wait().await; @@ -825,6 +828,7 @@ impl MutinyStorage for IndexedDbStorage { indexed_db.close(); } } + log_debug!(self.logger, "stopped storage"); } fn connected(&self) -> Result {