Skip to content

Commit 12a4319

Browse files
committed
Change some context log message levels.
Reduce some messages from info to debug that should not be displayed by default to all users of the library. Signed-off-by: William Brown <william.brown@suse.com>
1 parent 8a7a4cb commit 12a4319

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

tss-esapi/src/context.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ use crate::{
1212
Error, Result, ReturnCode, WrapperErrorKind as ErrorKind,
1313
};
1414
use handle_manager::HandleManager;
15-
use log::{error, info};
15+
use log::{debug, error};
1616
use mbox::MBox;
1717
use std::collections::HashMap;
1818
use std::ptr::null_mut;
@@ -447,19 +447,19 @@ impl Context {
447447

448448
impl Drop for Context {
449449
fn drop(&mut self) {
450-
info!("Closing context.");
450+
debug!("Closing context.");
451451

452452
// Flush handles
453453
for handle in self.handle_manager.handles_to_flush() {
454-
info!("Flushing handle {}", ESYS_TR::from(handle));
454+
debug!("Flushing handle {}", ESYS_TR::from(handle));
455455
if let Err(e) = self.flush_context(handle) {
456456
error!("Error when dropping the context: {}", e);
457457
}
458458
}
459459

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

0 commit comments

Comments
 (0)