This commit is contained in:
Conrad Ludgate
2025-02-05 11:26:10 +00:00
parent 47c15899c9
commit 57d51d581d
2 changed files with 13 additions and 6 deletions

View File

@@ -131,3 +131,6 @@ rstest.workspace = true
walkdir.workspace = true
rand_distr = "0.4"
tokio-postgres.workspace = true
[lints.rust]
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(tokio_unstable)'] }

View File

@@ -69,13 +69,17 @@ pub async fn init() -> anyhow::Result<LoggingGuard> {
None
};
let tokio_console = console_subscriber::ConsoleLayer::builder()
.enable_grpc_web(true)
.spawn();
let reg = tracing_subscriber::registry();
tracing_subscriber::registry()
.with(tokio_console)
.with(env_filter)
#[cfg(tokio_unstable)]
let reg = reg.with(
console_subscriber::ConsoleLayer::builder()
.with_default_env()
.enable_grpc_web(true)
.spawn(),
);
reg.with(env_filter)
.with(otlp_layer)
.with(json_log_layer)
.with(text_log_layer)