Skip to content

Commit b0a04ef

Browse files
committed
refactor: remove tracing codes
1 parent 73ba4d9 commit b0a04ef

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+50
-666
lines changed

Cargo.lock

Lines changed: 3 additions & 82 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ chrono = "0.4.38"
3131
rustix = { version = "1", features = ["process", "stdio"] }
3232
libc = "0.2.159"
3333
reqwest = { version = "0.12.8", default-features = false }
34-
spdlog-rs = { git = "https://github.com/SpriteOvO/spdlog-rs.git", branch = "sink-decouple", features = [
34+
spdlog-rs = { git = "https://github.com/SpriteOvO/spdlog-rs.git", branch = "main-dev", features = [
3535
"multi-thread",
3636
"source-location",
3737
], optional = true }
@@ -56,7 +56,6 @@ clap_complete = { version = "4.5", features = ["unstable-dynamic"] }
5656
clap_lex = "0.7.4"
5757
fs4 = "0.13.1"
5858
fs_extra = "1.3.0"
59-
tracing-appender = { version = "0.2.3", optional = true }
6059
dirs = "6.0.0"
6160
termtree = "0.5.1"
6261
textwrap = "0.16.2"
@@ -107,38 +106,6 @@ openssl = [
107106
]
108107
nice-setup = ["sequoia-nettle-backend", "rustls", "oma-refresh/apt"]
109108
openssl-setup = ["sequoia-openssl-backend", "openssl", "oma-refresh/apt"]
110-
spdlog-rs = [
111-
"dep:spdlog-rs",
112-
"oma-utils/spdlog-rs",
113-
"oma-console/spdlog-rs",
114-
"oma-pm/spdlog-rs",
115-
"oma-refresh/spdlog-rs",
116-
"oma-contents/spdlog-rs",
117-
"oma-fetch/spdlog-rs",
118-
"oma-topics/spdlog-rs",
119-
"oma-history/spdlog-rs",
120-
"oma-repo-verify/spdlog-rs",
121-
"oma-mirror/spdlog-rs",
122-
"apt-auth-config/spdlog-rs",
123-
"oma-tum/spdlog-rs",
124-
]
125-
tracing = [
126-
"dep:tracing",
127-
"dep:tracing-subscriber",
128-
"dep:tracing-appender",
129-
"oma-utils/tracing",
130-
"oma-console/tracing",
131-
"oma-pm/tracing",
132-
"oma-refresh/tracing",
133-
"oma-contents/tracing",
134-
"oma-fetch/tracing",
135-
"oma-topics/tracing",
136-
"oma-history/tracing",
137-
"oma-repo-verify/tracing",
138-
"oma-mirror/tracing",
139-
"apt-auth-config/tracing",
140-
"oma-tum/tracing",
141-
]
142109
default = ["aosc", "nice-setup"]
143110

144111
[workspace]

apt-auth-config/Cargo.toml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,6 @@ license = "MIT"
77

88
[dependencies]
99
thiserror = "2"
10-
spdlog-rs = { git = "https://github.com/SpriteOvO/spdlog-rs.git", branch = "sink-decouple", optional = true }
11-
tracing = { version = "0.1", optional = true }
10+
spdlog-rs = { git = "https://github.com/SpriteOvO/spdlog-rs.git", branch = "main-dev" }
1211
rust-netrc = "0.1"
1312
url = "2.5"
14-
15-
[features]
16-
spdlog-rs = ["dep:spdlog-rs"]
17-
tracing = ["dep:tracing"]

oma-console/Cargo.toml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,7 @@ license = "MIT"
1111
chrono = { version = "0.4.38", optional = true }
1212
console = { version = "0.16", optional = true }
1313
indicatif = { version = "0.18", optional = true }
14-
spdlog-rs = { git = "https://github.com/SpriteOvO/spdlog-rs.git", branch = "sink-decouple", optional = true }
15-
tracing = { version = "0.1", optional = true }
16-
tracing-subscriber = { version = "0.3", optional = true }
14+
spdlog-rs = { git = "https://github.com/SpriteOvO/spdlog-rs.git", branch = "main-dev" }
1715
ratatui = { version = "0.29", optional = true }
1816
# https://github.com/async-rs/async-std/issues/1055
1917
# https://github.com/tokio-rs/tokio/issues/5535
@@ -23,9 +21,7 @@ textwrap = { version = "0.16", optional = true }
2321
aho-corasick = { version = "1.1.3", optional = true }
2422

2523
[features]
26-
tracing = ["dep:tracing", "dep:tracing-subscriber"]
2724
print = ["dep:textwrap", "dep:console", "dep:termbg", "dep:chrono"]
2825
pager = ["dep:ratatui", "dep:ansi-to-tui", "dep:console", "dep:aho-corasick"]
2926
progress_bar_style = ["dep:indicatif"]
30-
spdlog-rs = ["dep:spdlog-rs"]
3127
default = ["print", "pager", "progress_bar_style"]

oma-console/examples/msg.rs

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,5 @@
1-
#[cfg(feature = "spdlog-rs")]
21
use oma_console::OmaFormatter;
32

4-
#[cfg(not(feature = "spdlog-rs"))]
5-
use oma_console::OmaLayer;
6-
#[cfg(not(feature = "spdlog-rs"))]
7-
use tracing_subscriber::{prelude::__tracing_subscriber_SubscriberExt, util::SubscriberInitExt};
8-
9-
#[cfg(not(feature = "spdlog-rs"))]
10-
fn main() {
11-
tracing_subscriber::registry().with(OmaLayer::new()).init();
12-
tracing::info!("Welcome");
13-
tracing::debug!("Hello");
14-
tracing::info!("I'am fine");
15-
tracing::warn!("Thank you");
16-
tracing::error!("and you?");
17-
}
18-
19-
#[cfg(feature = "spdlog-rs")]
203
fn main() {
214
spdlog::default_logger()
225
.sinks()

oma-console/src/lib.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,7 @@ pub mod writer;
2929
#[cfg(feature = "print")]
3030
pub mod print;
3131

32-
#[cfg(not(all(feature = "print", feature = "spdlog-rs")))]
33-
pub use print::OmaLayer;
34-
35-
#[cfg(all(feature = "print", feature = "spdlog-rs"))]
32+
#[cfg(feature = "print")]
3633
pub use print::OmaFormatter;
3734

3835
#[cfg(feature = "print")]

oma-console/src/pager.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,8 @@ use ratatui::{
2222
},
2323
widgets::Borders,
2424
};
25-
#[cfg(feature = "spdlog-rs")]
2625
use spdlog::debug;
2726
use termbg::Theme;
28-
#[cfg(not(feature = "spdlog-rs"))]
29-
use tracing::debug;
3027

3128
use crate::{print::OmaColorFormat, writer::Writer};
3229

0 commit comments

Comments
 (0)