diff --git a/sqlx-core/src/net/tls/tls_rustls.rs b/sqlx-core/src/net/tls/tls_rustls.rs index 1ecbbad51..38e640756 100644 --- a/sqlx-core/src/net/tls/tls_rustls.rs +++ b/sqlx-core/src/net/tls/tls_rustls.rs @@ -219,11 +219,11 @@ fn import_root_certs() -> RootCertStore { let load_results = rustls_native_certs::load_native_certs(); for e in load_results.errors { - log::warn!("Error loading native certificates: {e:?}"); + tracing::warn!("Error loading native certificates: {e:?}"); } for cert in load_results.certs { if let Err(e) = root_cert_store.add(cert) { - log::warn!("rustls failed to parse native certificate: {e:?}"); + tracing::warn!("rustls failed to parse native certificate: {e:?}"); } } diff --git a/sqlx-mysql/src/connection/establish.rs b/sqlx-mysql/src/connection/establish.rs index f61654d87..0ec91ed1d 100644 --- a/sqlx-mysql/src/connection/establish.rs +++ b/sqlx-mysql/src/connection/establish.rs @@ -46,7 +46,7 @@ impl<'a> DoHandshake<'a> { MySqlSslMode::Disabled | MySqlSslMode::Preferred ) { - log::warn!("Security warning: sending cleartext passwords without requiring SSL"); + tracing::warn!("Security warning: sending cleartext passwords without requiring SSL"); } Ok(Self { options }) diff --git a/sqlx-sqlite/src/regexp.rs b/sqlx-sqlite/src/regexp.rs index eb14fffc7..12f9a5ff1 100644 --- a/sqlx-sqlite/src/regexp.rs +++ b/sqlx-sqlite/src/regexp.rs @@ -15,7 +15,6 @@ //! - use libsqlite3_sys as ffi; -use log::error; use regex::Regex; use std::sync::Arc; @@ -62,7 +61,7 @@ unsafe extern "C" fn sqlite3_regexp_func( ) { // check the arg size. sqlite3 should already ensure this is only 2 args but we want to double check if n_arg != 2 { - eprintln!("n_arg expected to be 2, is {n_arg}"); + tracing::error!("n_arg expected to be 2, is {n_arg}"); ffi::sqlite3_result_error_code(ctx, ffi::SQLITE_CONSTRAINT_FUNCTION); return; } @@ -117,7 +116,7 @@ unsafe fn get_regex_from_arg( let regex = match Regex::new(value) { Ok(regex) => Arc::new(regex), Err(e) => { - error!("Invalid regex {value:?}: {e:?}"); + tracing::error!("Invalid regex {value:?}: {e:?}"); ffi::sqlite3_result_error_code(ctx, ffi::SQLITE_CONSTRAINT_FUNCTION); return None; } @@ -153,7 +152,7 @@ unsafe fn get_text_from_arg<'a>( match std::str::from_utf8(slice) { Ok(result) => Some(result), Err(e) => { - log::error!("Incoming text is not valid UTF8: {e:?}"); + tracing::error!("Incoming text is not valid UTF8: {e:?}"); ffi::sqlite3_result_error_code(ctx, ffi::SQLITE_CONSTRAINT_FUNCTION); None }