chore: update logs

This commit is contained in:
nathan 2024-04-02 20:10:22 +08:00
parent 0da1b2433b
commit 1101c9d72a
4 changed files with 6 additions and 2 deletions

View File

@ -1,7 +1,6 @@
pub mod entities;
use crate::entities::{ClientAPIConfig, ClientResponse};
use client_api::{Client, ClientConfiguration};
use tracing;
use wasm_bindgen::prelude::*;
// When the `wee_alloc` feature is enabled, use `wee_alloc` as the global

View File

@ -32,6 +32,7 @@ pub struct SyncPlugin<Sink, Stream, C> {
impl<Sink, Stream, C> Drop for SyncPlugin<Sink, Stream, C> {
fn drop(&mut self) {
#[cfg(feature = "sync_verbose_log")]
trace!("Drop sync plugin: {}", self.object.object_id);
}
}

View File

@ -18,6 +18,7 @@ pub struct WebSocketChannel<T> {
impl<T> Drop for WebSocketChannel<T> {
fn drop(&mut self) {
#[cfg(feature = "sync_verbose_log")]
trace!("Drop WebSocketChannel {}", self.object_id);
}
}
@ -53,6 +54,8 @@ where
while let Some(msg) = rx.recv().await {
let _ = cloned_sender.send(msg);
}
#[cfg(feature = "sync_verbose_log")]
trace!("WebSocketChannel {} sink closed", object_id);
});
BroadcastSink::new(tx)
@ -70,6 +73,7 @@ where
break;
}
}
#[cfg(feature = "sync_verbose_log")]
trace!("WebSocketChannel {} stream closed", object_id);
});
UnboundedReceiverStream::new(rx)

View File

@ -19,7 +19,7 @@ async fn wasm_sign_in_success() {
.sign_in_password(user.email.as_str(), user.password.as_str())
.await;
assert!(res.ok());
assert!(res.is_ok());
let val = res.unwrap();