From 6eabfb5adb8b012bf0e4b8f17a3cfa42caf5b854 Mon Sep 17 00:00:00 2001 From: Sander van Harmelen Date: Tue, 17 Sep 2024 08:53:27 +0200 Subject: [PATCH] Make the client log (most things) to debug instead of info level As we have the client embedded in another app, its nice if we can reduce logs from the lib a little when running the app with info level logging. --- lib/src/client/session/client.rs | 4 ++-- lib/src/client/transport/channel.rs | 8 ++++---- lib/src/client/transport/core.rs | 4 ++-- lib/src/client/transport/state.rs | 6 +++--- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/lib/src/client/session/client.rs b/lib/src/client/session/client.rs index fd11b279f..f09ee7d88 100644 --- a/lib/src/client/session/client.rs +++ b/lib/src/client/session/client.rs @@ -114,9 +114,9 @@ impl Client { Ok(endpoints) => endpoints, }; - info!("Server has these endpoints:"); + debug!("Server has these endpoints:"); endpoints.iter().for_each(|e| { - info!( + debug!( " {} - {:?} / {:?}", e.endpoint_url, SecurityPolicy::from_str(e.security_policy_uri.as_ref()).unwrap(), diff --git a/lib/src/client/transport/channel.rs b/lib/src/client/transport/channel.rs index 7273cc9dc..a64180e67 100644 --- a/lib/src/client/transport/channel.rs +++ b/lib/src/client/transport/channel.rs @@ -203,7 +203,7 @@ impl AsyncSecureChannel { &self, ) -> Result<(TcpTransport, tokio::sync::mpsc::Sender), StatusCode> { let endpoint_url = self.session_info.endpoint.endpoint_url.clone(); - info!("Connect"); + debug!("connect"); let security_policy = SecurityPolicy::from_str(self.session_info.endpoint.security_policy_uri.as_ref()) .unwrap(); @@ -229,9 +229,9 @@ impl AsyncSecureChannel { let _ = secure_channel.set_remote_cert_from_byte_string( &self.session_info.endpoint.server_certificate, ); - info!("Security policy = {:?}", security_policy); - info!( - "Security mode = {:?}", + debug!("security policy = {:?}", security_policy); + debug!( + "security mode = {:?}", self.session_info.endpoint.security_mode ); } diff --git a/lib/src/client/transport/core.rs b/lib/src/client/transport/core.rs index 754231d16..e73fffa3e 100644 --- a/lib/src/client/transport/core.rs +++ b/lib/src/client/transport/core.rs @@ -262,8 +262,8 @@ impl TransportState { .sequence_number; for c in chunks { if c.header.sequence_header.sequence_number != expect_sequence_number { - info!( - "receive wrong chunk expect seq={},got={}", + debug!( + "received wrong chunk expected seq={}, got={}", expect_sequence_number, c.header.sequence_header.sequence_number ); continue; //may be duplicate chunk diff --git a/lib/src/client/transport/state.rs b/lib/src/client/transport/state.rs index 9bd8eb59d..060a12c85 100644 --- a/lib/src/client/transport/state.rs +++ b/lib/src/client/transport/state.rs @@ -133,9 +133,9 @@ impl SecureChannelState { ) }; - info!("Making secure channel request"); - info!("security_mode = {:?}", security_mode); - info!("security_policy = {:?}", security_policy); + debug!("Making secure channel request"); + debug!("security_mode = {:?}", security_mode); + debug!("security_policy = {:?}", security_policy); let requested_lifetime = REQUESTED_LIFETIME; let request = OpenSecureChannelRequest {