chore(cargo): replace log dependency with tracing

This commit is contained in:
Michael Aaron Murphy 2024-03-15 14:49:33 +01:00 committed by Jeremy Soller
parent 074d962ae9
commit 32229c16f0
No known key found for this signature in database
GPG key ID: D02FD439211AF56F
10 changed files with 10 additions and 22 deletions

4
Cargo.lock generated
View file

@ -882,7 +882,6 @@ dependencies = [
"i18n-embed-fl",
"itertools",
"libcosmic",
"log",
"nix 0.28.0",
"once_cell",
"rand",
@ -933,7 +932,6 @@ dependencies = [
"i18n-embed",
"i18n-embed-fl",
"libcosmic",
"log",
"once_cell",
"rust-embed",
"tokio",
@ -957,7 +955,6 @@ dependencies = [
"i18n-embed-fl",
"itertools",
"libcosmic",
"log",
"once_cell",
"rand",
"rust-embed",
@ -1003,7 +1000,6 @@ dependencies = [
"i18n-embed-fl",
"itertools",
"libcosmic",
"log",
"rust-embed",
"rust-embed-utils",
"slotmap",

View file

@ -14,7 +14,6 @@ i18n-embed.workspace = true
i18n-embed-fl.workspace = true
itertools = "0.12.1"
libcosmic.workspace = true
log = "0.4"
nix.workspace = true
once_cell = "1.19"
rand = "0.8.5"

View file

@ -1236,8 +1236,8 @@ impl cosmic::Application for CosmicAppList {
}),
rectangle_tracker_subscription(0).map(|update| Message::Rectangle(update.1)),
self.core.watch_config(APP_ID).map(|u| {
for err in u.errors {
log::error!("Error watching config: {}", err);
for why in u.errors {
tracing::error!(why = why.to_string(), "Error watching config");
}
Message::ConfigUpdated(u.config)
}),

View file

@ -10,7 +10,6 @@ futures.workspace = true
i18n-embed-fl.workspace = true
i18n-embed.workspace = true
libcosmic.workspace = true
log = "0.4"
once_cell = "1.19.0"
rust-embed.workspace = true
tokio = { version = "1.36.0", features = ["sync", "rt", "rt-multi-thread", "fs", "macros"] }

View file

@ -33,7 +33,6 @@ use cosmic::Command;
use cosmic::{Element, Theme};
use cosmic_time::{anim, chain, id, once_cell::sync::Lazy, Instant, Timeline};
use log::error;
use std::collections::HashMap;
use std::path::PathBuf;
use std::time::Duration;
@ -227,8 +226,8 @@ impl cosmic::Application for CosmicBatteryApplet {
self.timeline.set_chain(chain).start();
self.set_charging_limit(enable);
}
Message::Errored(e) => {
error!("{}", e);
Message::Errored(why) => {
tracing::error!("{}", why);
}
Message::TogglePopup => {
if let Some(p) = self.popup.take() {

View file

@ -14,7 +14,6 @@ i18n-embed-fl.workspace = true
i18n-embed.workspace = true
itertools = "0.12.1"
libcosmic.workspace = true
log = "0.4"
once_cell = "1.19.0"
rand = "0.8"
rust-embed.workspace = true

View file

@ -15,7 +15,6 @@ i18n-embed-fl.workspace = true
i18n-embed.workspace = true
itertools = "0.12.1"
libcosmic.workspace = true
log = "0.4"
rust-embed-utils.workspace = true
rust-embed.workspace = true
slotmap = "1.0.7"

View file

@ -2,7 +2,6 @@ use super::{NetworkManagerEvent, NetworkManagerState};
use cosmic::iced::{self, subscription};
use cosmic_dbus_networkmanager::nm::NetworkManager;
use futures::{SinkExt, StreamExt};
use log::error;
use std::fmt::Debug;
use std::hash::Hash;
use zbus::Connection;
@ -39,8 +38,8 @@ async fn start_listening(
};
let network_manager = match NetworkManager::new(&conn).await {
Ok(n) => n,
Err(e) => {
error!("Failed to connect to NetworkManager: {}", e);
Err(why) => {
tracing::error!(why = why.to_string(), "Failed to connect to NetworkManager");
return State::Error;
}
};

View file

@ -2,7 +2,6 @@ use super::{NetworkManagerEvent, NetworkManagerState};
use cosmic::iced::{self, subscription};
use cosmic_dbus_networkmanager::nm::NetworkManager;
use futures::{SinkExt, StreamExt};
use log::error;
use std::fmt::Debug;
use std::hash::Hash;
use zbus::Connection;
@ -41,8 +40,8 @@ async fn start_listening(
};
let network_manager = match NetworkManager::new(&conn).await {
Ok(n) => n,
Err(e) => {
error!("Failed to connect to NetworkManager: {}", e);
Err(why) => {
tracing::error!(why = why.to_string(), "Failed to connect to NetworkManager");
return State::Error;
}
};

View file

@ -2,7 +2,6 @@ use super::{NetworkManagerEvent, NetworkManagerState};
use cosmic::iced::{self, subscription};
use cosmic_dbus_networkmanager::nm::NetworkManager;
use futures::{SinkExt, StreamExt};
use log::error;
use std::fmt::Debug;
use std::hash::Hash;
use zbus::Connection;
@ -40,8 +39,8 @@ async fn start_listening(
let network_manager = match NetworkManager::new(&conn).await {
Ok(n) => n,
Err(e) => {
error!("Failed to connect to NetworkManager: {}", e);
Err(why) => {
tracing::error!(why = why.to_string(), "Failed to connect to NetworkManager");
return State::Error;
}
};