diff --git a/apps/desktop/desktop_native/Cargo.lock b/apps/desktop/desktop_native/Cargo.lock index 1c19c7b64aa..b1ab3a353ab 100644 --- a/apps/desktop/desktop_native/Cargo.lock +++ b/apps/desktop/desktop_native/Cargo.lock @@ -460,7 +460,6 @@ dependencies = [ "cbc", "hex", "homedir", - "log", "oo7", "pbkdf2", "rand 0.9.1", @@ -915,7 +914,6 @@ dependencies = [ "interprocess", "keytar", "libc", - "log", "oo7", "pin-project", "pkcs8", @@ -954,7 +952,6 @@ dependencies = [ "bitwarden_chromium_importer", "desktop_core", "hex", - "log", "napi", "napi-build", "napi-derive", diff --git a/apps/desktop/desktop_native/bitwarden_chromium_importer/Cargo.toml b/apps/desktop/desktop_native/bitwarden_chromium_importer/Cargo.toml index 8512ed1b319..b7289c48609 100644 --- a/apps/desktop/desktop_native/bitwarden_chromium_importer/Cargo.toml +++ b/apps/desktop/desktop_native/bitwarden_chromium_importer/Cargo.toml @@ -14,7 +14,6 @@ base64 = { workspace = true } cbc = { workspace = true, features = ["alloc"] } hex = { workspace = true } homedir = { workspace = true } -log = { workspace = true } pbkdf2 = "=0.12.2" rand = { workspace = true } rusqlite = { version = "=0.35.0", features = ["bundled"] } diff --git a/apps/desktop/desktop_native/core/Cargo.toml b/apps/desktop/desktop_native/core/Cargo.toml index 749e7581673..971920b0d91 100644 --- a/apps/desktop/desktop_native/core/Cargo.toml +++ b/apps/desktop/desktop_native/core/Cargo.toml @@ -31,7 +31,6 @@ ed25519 = { workspace = true, features = ["pkcs8"] } futures = { workspace = true } homedir = { workspace = true } interprocess = { workspace = true, features = ["tokio"] } -log = { workspace = true } pin-project = { workspace = true } pkcs8 = { workspace = true, features = ["alloc", "encryption", "pem"] } rand = { workspace = true } diff --git a/apps/desktop/desktop_native/core/src/ipc/client.rs b/apps/desktop/desktop_native/core/src/ipc/client.rs index 6c4ca0a6053..45b19e72bb8 100644 --- a/apps/desktop/desktop_native/core/src/ipc/client.rs +++ b/apps/desktop/desktop_native/core/src/ipc/client.rs @@ -5,21 +5,21 @@ use interprocess::local_socket::{ tokio::{prelude::*, Stream}, GenericFilePath, ToFsName, }; -use log::{error, info}; +use tracing::{error, info}; pub async fn connect( path: PathBuf, send: tokio::sync::mpsc::Sender, mut recv: tokio::sync::mpsc::Receiver, ) -> Result<(), Box> { - info!("Attempting to connect to {}", path.display()); + info!(?path, "Attempting to connect"); let name = path.as_os_str().to_fs_name::()?; let conn = Stream::connect(name).await?; let mut conn = crate::ipc::internal_ipc_codec(conn); - info!("Connected to {}", path.display()); + info!(?path, "Connected"); // This `connected` and the latter `disconnected` messages are the only ones that // are sent from the Rust IPC code and not just forwarded from the desktop app. @@ -46,7 +46,7 @@ pub async fn connect( res = conn.next() => { match res { Some(Err(e)) => { - error!("Error reading from IPC server: {e}"); + error!(error = %e, "Error reading from IPC server"); break; } None => { diff --git a/apps/desktop/desktop_native/core/src/ipc/server.rs b/apps/desktop/desktop_native/core/src/ipc/server.rs index a1c77e7ab16..2762a832ac6 100644 --- a/apps/desktop/desktop_native/core/src/ipc/server.rs +++ b/apps/desktop/desktop_native/core/src/ipc/server.rs @@ -7,12 +7,12 @@ use futures::{SinkExt, StreamExt, TryFutureExt}; use anyhow::Result; use interprocess::local_socket::{tokio::prelude::*, GenericFilePath, ListenerOptions}; -use log::{error, info}; use tokio::{ io::{AsyncRead, AsyncWrite}, sync::{broadcast, mpsc}, }; use tokio_util::sync::CancellationToken; +use tracing::{error, info}; use super::MESSAGE_CHANNEL_BUFFER; @@ -143,11 +143,11 @@ async fn listen_incoming( client_id ); tokio::spawn(future.map_err(|e| { - error!("Error handling connection: {}", e) + error!(error = %e, "Error handling connection") })); }, Err(e) => { - error!("Error accepting connection: {}", e); + error!(error = %e, "Error accepting connection"); break; }, } @@ -176,7 +176,7 @@ async fn handle_connection( loop { tokio::select! { _ = cancel_token.cancelled() => { - info!("Client {client_id} cancelled."); + info!(client_id, "Client cancelled."); break; }, @@ -187,7 +187,7 @@ async fn handle_connection( client_stream.send(msg.into()).await?; }, Err(e) => { - info!("Error reading message: {}", e); + error!(error = %e, "Error reading message"); break; } } @@ -199,7 +199,7 @@ async fn handle_connection( result = client_stream.next() => { match result { Some(Err(e)) => { - info!("Error reading from client {client_id}: {e}"); + error!(client_id, error = %e, "Error reading from client"); client_to_server_send.send(Message { client_id, @@ -209,7 +209,7 @@ async fn handle_connection( break; }, None => { - info!("Client {client_id} disconnected."); + info!(client_id, "Client disconnected."); client_to_server_send.send(Message { client_id, diff --git a/apps/desktop/desktop_native/napi/Cargo.toml b/apps/desktop/desktop_native/napi/Cargo.toml index 70beb4a675c..5e2e42b463f 100644 --- a/apps/desktop/desktop_native/napi/Cargo.toml +++ b/apps/desktop/desktop_native/napi/Cargo.toml @@ -20,7 +20,6 @@ base64 = { workspace = true } bitwarden_chromium_importer = { path = "../bitwarden_chromium_importer" } desktop_core = { path = "../core" } hex = { workspace = true } -log = { workspace = true } napi = { workspace = true, features = ["async"] } napi-derive = { workspace = true } serde = { workspace = true, features = ["derive"] }