diff --git a/crates/tabby/src/main.rs b/crates/tabby/src/main.rs index fe7c4a4ad7b..d400a6cea0e 100644 --- a/crates/tabby/src/main.rs +++ b/crates/tabby/src/main.rs @@ -15,6 +15,7 @@ use opentelemetry::{ }; use opentelemetry_otlp::WithExportConfig; use tabby_common::config::Config; +use tracing::metadata::LevelFilter; use tracing_subscriber::{layer::SubscriberExt, util::SubscriberInitExt, EnvFilter, Layer}; #[derive(Parser)] @@ -174,10 +175,9 @@ fn init_logging(otlp_endpoint: Option) { }; } - let env_filter = EnvFilter::from_default_env() - .add_directive("tabby=info".parse().unwrap()) - .add_directive("axum_tracing_opentelemetry=info".parse().unwrap()) - .add_directive("otel=debug".parse().unwrap()); + let env_filter = EnvFilter::builder() + .with_default_directive(LevelFilter::INFO.into()) + .from_env_lossy(); tracing_subscriber::registry() .with(layers) diff --git a/website/docs/faq.mdx b/website/docs/faq.mdx index 3dc6ecb632f..22a384b65c3 100644 --- a/website/docs/faq.mdx +++ b/website/docs/faq.mdx @@ -36,3 +36,11 @@ import CodeBlock from '@theme/CodeBlock';

For details on the registry format, please refer to models.json

+ +
+ Why can't I see the debug logs? +
+

The default log level for tabby server is info.

+

To enable debug logs, add RUST_LOG=debug environment before tabby command, e.g. RUST_LOG=debug tabbyml/tabby serve --model TabbyML/SantaCoder-1B --device cuda.

+
+
\ No newline at end of file