Skip to content

Commit 48b706c

Browse files
committed
build: switch to tracing for logging
1 parent 9790e56 commit 48b706c

File tree

19 files changed

+329
-151
lines changed

19 files changed

+329
-151
lines changed

Cargo.lock

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

Cargo.toml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ include = [
1919

2020
[dependencies]
2121
der = { version = "0.7.7", features = ["std"] }
22-
log = { workspace = true }
2322
rusqlite = { version = ">= 0.28.0", optional = true }
23+
tracing = { workspace = true }
2424

2525
[dev-dependencies]
2626
tempfile = { workspace = true }
@@ -29,15 +29,25 @@ tempfile = { workspace = true }
2929
default = []
3030
sqlite = ["dep:rusqlite"]
3131
sqlite-bundled = ["sqlite", "rusqlite/bundled"]
32+
log = ["tracing/log"]
3233

3334
[workspace]
3435
members = ["capi", "fuzzer", "tests/testhelper", "tools"]
3536
resolver = "3"
3637

3738
[workspace.dependencies]
38-
log = "0.4.21"
3939
tempfile = "3.10.1"
4040

41+
[workspace.dependencies.tracing]
42+
version = "0.1.18"
43+
default-features = false
44+
features = ["std", "release_max_level_info"]
45+
46+
[workspace.dependencies.tracing-subscriber]
47+
version = "0.3.0"
48+
default-features = false
49+
features = ["ansi", "fmt", "std"]
50+
4151
[profile.release]
4252
lto = true
4353
opt-level = 3

NEWS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ What's New in libchewing (unreleased)
3838
- autolearn: new phrases with break words inside will be learned both with
3939
and without the break word.
4040
- rust: simplified dictionary API.
41+
- rust: logging now depends on tracing and tracing-subscriber.
4142

4243
* Dictionary
4344
- Default symbols.dat now includes commonly used emojis.

capi/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ crate-type = ["rlib", "staticlib"]
1111

1212
[dependencies]
1313
chewing = { version = "0.11.0-alpha.6", path = ".." }
14-
env_logger = { version = ">= 0.11.0-alpha.6", default-features = false }
15-
log = { workspace = true }
14+
tracing = { workspace = true }
15+
tracing-subscriber = { workspace = true }
1616

1717
[dev-dependencies]
1818
tempfile = { workspace = true }

0 commit comments

Comments
 (0)