From 12a43199171b0bc4fc5216a776f08334e37c357b Mon Sep 17 00:00:00 2001 From: William Brown Date: Sat, 7 Oct 2023 15:58:35 +1000 Subject: [PATCH] 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 --- tss-esapi/src/context.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tss-esapi/src/context.rs b/tss-esapi/src/context.rs index 9c015f91..5df7b9a7 100644 --- a/tss-esapi/src/context.rs +++ b/tss-esapi/src/context.rs @@ -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; @@ -447,11 +447,11 @@ 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); } @@ -459,7 +459,7 @@ impl Drop for Context { // 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); } @@ -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."); } }