Skip to content

Commit

Permalink
eguard: opts
Browse files Browse the repository at this point in the history
  • Loading branch information
chriskaliX committed Mar 7, 2024
1 parent c2672c3 commit 3e6dee9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
6 changes: 6 additions & 0 deletions SDK/rust/src/logger.rs
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,12 @@ impl Logger {
}
}

impl Drop for Logger {
fn drop(&mut self) {
self.flush()
}
}

impl Log for Logger {
fn enabled(&self, metadata: &log::Metadata<'_>) -> bool {
metadata.level()
Expand Down
5 changes: 1 addition & 4 deletions plugins/eguard/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,7 @@ fn main() -> Result<()> {
let result = match tokio::time::timeout(timeout, client_c.receive_async()).await
{
Ok(result) => result,
Err(err) => {
error!("get task failed:{}", err);
continue;
}
Err(_) => continue, // ignore timeout
};

let task = match result {
Expand Down

0 comments on commit 3e6dee9

Please sign in to comment.