Use default env filter for tracing

This commit is contained in:
Filip Tibell 2023-08-22 10:47:09 -05:00
parent 1cb8ea99a3
commit 58d64fc0c8
3 changed files with 35 additions and 6 deletions

35
Cargo.lock generated
View file

@ -1102,6 +1102,15 @@ dependencies = [
"twox-hash",
]
[[package]]
name = "matchers"
version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558"
dependencies = [
"regex-automata 0.1.10",
]
[[package]]
name = "memchr"
version = "2.5.0"
@ -1594,8 +1603,17 @@ checksum = "81bc1d4caf89fac26a70747fe603c130093b53c773888797a6329091246d651a"
dependencies = [
"aho-corasick",
"memchr",
"regex-automata",
"regex-syntax",
"regex-automata 0.3.6",
"regex-syntax 0.7.4",
]
[[package]]
name = "regex-automata"
version = "0.1.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132"
dependencies = [
"regex-syntax 0.6.29",
]
[[package]]
@ -1606,9 +1624,15 @@ checksum = "fed1ceff11a1dddaee50c9dc8e4938bd106e9d89ae372f192311e7da498e3b69"
dependencies = [
"aho-corasick",
"memchr",
"regex-syntax",
"regex-syntax 0.7.4",
]
[[package]]
name = "regex-syntax"
version = "0.6.29"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1"
[[package]]
name = "regex-syntax"
version = "0.7.4"
@ -2264,6 +2288,7 @@ dependencies = [
"signal-hook-registry",
"socket2 0.5.3",
"tokio-macros",
"tracing",
"windows-sys 0.48.0",
]
@ -2408,10 +2433,14 @@ version = "0.3.17"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "30a651bc37f915e81f087d86e62a18eec5f79550c7faff886f7090b4ea757c77"
dependencies = [
"matchers",
"nu-ansi-term",
"once_cell",
"regex",
"sharded-slab",
"smallvec",
"thread_local",
"tracing",
"tracing-core",
"tracing-log",
]

View file

@ -79,9 +79,9 @@ urlencoding = "2.1"
### RUNTIME
tracing = "0.1"
tracing-subscriber = "0.3"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
mlua = { version = "0.9.0", features = ["luau", "luau-jit", "serialize"] }
tokio = { version = "1.24", features = ["full"] }
tokio = { version = "1.24", features = ["full", "tracing"] }
### SERDE

View file

@ -21,7 +21,7 @@ use console::style;
async fn main() -> ExitCode {
tracing_subscriber::fmt()
.compact()
.with_max_level(tracing::Level::ERROR)
.with_env_filter(tracing_subscriber::filter::EnvFilter::from_default_env())
.with_target(true)
.with_timer(tracing_subscriber::fmt::time::uptime())
.with_level(true)