refactor(dev): move tracing to feature

This commit is contained in:
2025-09-06 20:17:14 +04:00
parent dbc800fef1
commit fdbb872fc3
2 changed files with 9 additions and 5 deletions

View File

@@ -10,6 +10,9 @@ publish = false
[profile.release]
debug = true
[features]
trace = ["tracing", "console-subscriber"]
[dependencies]
providers = { path = "providers" }
actix-macros = { path = "actix-macros" }
@@ -69,9 +72,10 @@ base64 = "0.22.1"
percent-encoding = "2.3.2"
ed25519-dalek = "3.0.0-pre.0"
# development tracing
console-subscriber = { version = "0.4.1", optional = true }
tracing = { version = "0.1.41", optional = true }
[dev-dependencies]
providers = { path = "providers", features = ["test"] }
actix-test = { path = "actix-test" }
console-subscriber = "0.4.1"
tracing = "0.1.41"
actix-test = { path = "actix-test" }

View File

@@ -26,7 +26,7 @@ pub(crate) mod tests {
STATE
.get_or_init(async || -> web::Data<AppState> {
#[cfg(all(test, tokio_unstable))]
#[cfg(feature = "trace")]
console_subscriber::init();
new_app_state(None).await.unwrap()