Skip to content

Commit

Permalink
Make the client log (most things) to debug instead of info level
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
svanharmelen committed Sep 17, 2024
1 parent cf2d1bd commit 6eabfb5
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions lib/src/client/session/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down
8 changes: 4 additions & 4 deletions lib/src/client/transport/channel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ impl AsyncSecureChannel {
&self,
) -> Result<(TcpTransport, tokio::sync::mpsc::Sender<OutgoingMessage>), 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();
Expand All @@ -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
);
}
Expand Down
4 changes: 2 additions & 2 deletions lib/src/client/transport/core.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions lib/src/client/transport/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 6eabfb5

Please sign in to comment.