Skip to content

Commit

Permalink
Merge pull request #454 from Firstyear/20231007-default-log-levels
Browse files Browse the repository at this point in the history
Change some context log message levels.
  • Loading branch information
ionut-arm authored Oct 18, 2023
2 parents 514c21b + 12a4319 commit a3765db
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tss-esapi/src/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ use crate::{
Error, Result, ReturnCode, WrapperErrorKind as ErrorKind,
};
use handle_manager::HandleManager;
use log::{error, info};
use log::{debug, error};
use mbox::MBox;
use std::collections::HashMap;
use std::ptr::null_mut;
Expand Down Expand Up @@ -447,19 +447,19 @@ impl Context {

impl Drop for Context {
fn drop(&mut self) {
info!("Closing context.");
debug!("Closing context.");

// Flush handles
for handle in self.handle_manager.handles_to_flush() {
info!("Flushing handle {}", ESYS_TR::from(handle));
debug!("Flushing handle {}", ESYS_TR::from(handle));
if let Err(e) = self.flush_context(handle) {
error!("Error when dropping the context: {}", e);
}
}

// Close handles
for handle in self.handle_manager.handles_to_close().iter_mut() {
info!("Closing handle {}", ESYS_TR::from(*handle));
debug!("Closing handle {}", ESYS_TR::from(*handle));
if let Err(e) = self.tr_close(handle) {
error!("Error when dropping context: {}.", e);
}
Expand All @@ -480,6 +480,6 @@ impl Drop for Context {
.unwrap(), // should not fail based on how the context is initialised/used
)
};
info!("Context closed.");
debug!("Context closed.");
}
}

0 comments on commit a3765db

Please sign in to comment.