Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make the client log (most things) to debug or warn instead of info #3

Merged
merged 2 commits into from
Dec 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions opcua-client/src/transport/channel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use std::{str::FromStr, sync::Arc, time::Duration};

use crate::{session::SessionInfo, transport::core::TransportPollResult};
use arc_swap::{ArcSwap, ArcSwapOption};
use log::{error, info};
use log::{debug, error};
use opcua_core::{
comms::secure_channel::{Role, SecureChannel},
sync::RwLock,
Expand Down Expand Up @@ -229,7 +229,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 Down Expand Up @@ -258,8 +258,8 @@ impl AsyncSecureChannel {
let _ = secure_channel.set_remote_cert_from_byte_string(
&self.session_info.endpoint.server_certificate,
);
info!("Security policy = {:?}", security_policy);
info!(
debug!("Security policy = {:?}", security_policy);
debug!(
"Security mode = {:?}",
self.session_info.endpoint.security_mode
);
Expand Down
8 changes: 4 additions & 4 deletions opcua-client/src/transport/core.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use std::sync::Arc;
use std::time::Instant;

use futures::future::Either;
use log::{debug, error, info, trace};
use log::{debug, error, trace, warn};
use opcua_core::{trace_read_lock, trace_write_lock, RequestMessage, ResponseMessage};
use parking_lot::RwLock;

Expand Down Expand Up @@ -205,7 +205,7 @@ impl TransportState {
}
}
MessageIsFinalType::FinalError => {
info!("Discarding chunk marked in as final error");
warn!("Discarding chunk marked in as final error");
let message_state = self.message_states.remove(&req_id).unwrap();
let _ = message_state
.callback
Expand Down Expand Up @@ -270,8 +270,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={}",
warn!(
"receive wrong chunk expect seq={} got={}",
expect_sequence_number, c.header.sequence_header.sequence_number
);
continue; //may be duplicate chunk
Expand Down
8 changes: 4 additions & 4 deletions opcua-client/src/transport/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use std::{
time::{Duration, Instant},
};

use log::{debug, info, trace};
use log::{debug, trace};
use tokio::sync::mpsc::error::SendTimeoutError;

use crate::{session::process_unexpected_response, transport::OutgoingMessage};
Expand Down Expand Up @@ -122,9 +122,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 request = OpenSecureChannelRequest {
request_header: self.make_request_header(timeout),
Expand Down
Loading