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

client: Reduce noisy logging when creating TlsConfig from Credentials #430

Merged
merged 1 commit into from
May 9, 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
10 changes: 5 additions & 5 deletions libs/gl-client-py/src/credentials.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,28 +83,28 @@ impl Credentials {
#[new]
pub fn new() -> Self {
let inner = UnifiedCredentials::Nobody(gl_client::credentials::Nobody::default());
log::debug!("Created NOBODY credentials {:?}", inner.tls_config().client_tls_config());
log::debug!("Created NOBODY credentials");
Self { inner }
}

#[staticmethod]
pub fn nobody_with(cert: &[u8], key: &[u8], ca: &[u8]) -> Self {
let inner = UnifiedCredentials::Nobody(gl_client::credentials::Nobody::with(cert, key, ca));
log::debug!("Created NOBODY credentials {:?}", inner.tls_config());
log::debug!("Created NOBODY credentials");
Self { inner }
}

#[staticmethod]
pub fn from_path(path: &str) -> Self {
let inner = UnifiedCredentials::Device(gl_client::credentials::Device::from_path(path));
log::debug!("Created device credentials {:?}", inner.tls_config());
log::debug!("Created device credentials");
Self { inner }
}

#[staticmethod]
pub fn from_bytes(data: &[u8]) -> Self {
let inner = UnifiedCredentials::Device(gl_client::credentials::Device::from_bytes(data));
log::debug!("Created device credentials {:?}", inner.tls_config());
log::debug!("Created device credentials");
Self { inner }
}

Expand Down Expand Up @@ -164,4 +164,4 @@ impl From<ErrorWrapper> for pyo3::PyErr {
fn from(value: ErrorWrapper) -> Self {
PyErr::new::<PyValueError, _>(value.to_string())
}
}
}
2 changes: 1 addition & 1 deletion libs/gl-client/src/credentials.rs
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ impl Device {
/// credentials data blob. It defaults to the nobody credentials set.
pub fn from_bytes(data: impl AsRef<[u8]>) -> Self {
let mut creds = Self::default();
debug!("Build authenticated credentials from: {:?}", data.as_ref());
log::trace!("Build authenticated credentials from: {:?}", data.as_ref());
if let Ok(data) = model::Data::try_from(data.as_ref()) {
creds.version = data.version;
if let Some(cert) = data.cert {
Expand Down
Loading