Disable tokio-console for Axum dependency conflicts.

Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
Jason Volk
2025-06-07 23:07:30 +00:00
parent ceb0f8f933
commit dc8bab9bcd
4 changed files with 29 additions and 226 deletions

View File

@@ -146,7 +146,7 @@ systemd = [
]
# enable the tokio_console server ncompatible with release_max_log_level
tokio_console = [
"dep:console-subscriber",
#"dep:console-subscriber",
"tokio/tracing",
]
url_preview = [
@@ -173,8 +173,8 @@ tuwunel-router.workspace = true
tuwunel-service.workspace = true
clap.workspace = true
console-subscriber.optional = true
console-subscriber.workspace = true
#console-subscriber.optional = true
#console-subscriber.workspace = true
const-str.workspace = true
ctor.workspace = true
log.workspace = true

View File

@@ -117,7 +117,7 @@ pub(crate) fn init(
// compile-time and runtime conditions to elide it, each of those changing the
// subscriber's type.
let (console_enabled, console_disabled_reason) = tokio_console_enabled(config);
#[cfg(all(feature = "tokio_console", tokio_unstable))]
#[cfg(all(feature = "tokio_console", tokio_unstable, tuwunel_disable))]
if console_enabled {
let console_layer = console_subscriber::ConsoleLayer::builder()
.with_default_env()
@@ -139,7 +139,7 @@ pub(crate) fn init(
}
fn tokio_console_enabled(config: &Config) -> (bool, &'static str) {
if !cfg!(all(feature = "tokio_console", tokio_unstable)) {
if !cfg!(all(feature = "tokio_console", tokio_unstable, tuwunel_disable)) {
return (false, "");
}