mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-03 07:04:49 +00:00
internal: remove spurious regex dependency
- replace tokio's env-filter with a smaller&simpler targets filter - reshuffle logging infra a bit to make sure there's only a single place where we read environmental variables - use anyhow::Result in rust-analyzer binary
This commit is contained in:
parent
fcfc6afe05
commit
424ef77809
14 changed files with 196 additions and 241 deletions
|
@ -30,7 +30,7 @@ use syntax::{
|
|||
ast::{self, AstNode, HasName},
|
||||
SyntaxNode,
|
||||
};
|
||||
use tracing_subscriber::{layer::SubscriberExt, EnvFilter, Registry};
|
||||
use tracing_subscriber::{layer::SubscriberExt, Registry};
|
||||
use tracing_tree::HierarchicalLayer;
|
||||
use triomphe::Arc;
|
||||
|
||||
|
@ -52,7 +52,8 @@ fn setup_tracing() -> Option<tracing::subscriber::DefaultGuard> {
|
|||
return None;
|
||||
}
|
||||
|
||||
let filter = EnvFilter::from_env("CHALK_DEBUG");
|
||||
let filter: tracing_subscriber::filter::Targets =
|
||||
env::var("CHALK_DEBUG").ok().and_then(|it| it.parse().ok()).unwrap_or_default();
|
||||
let layer = HierarchicalLayer::default()
|
||||
.with_indent_lines(true)
|
||||
.with_ansi(false)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue