Env logger feature (#3775)
* feat: Expose and configure tracing env-filter * doc: Add env-filter doc part * chore: Remove conditional import * Move logger env-filter feature out of feature flag * Update logger env filtering * Add RUST_LOG to the process from the cli * Typo * fix clippy * clippy
This commit is contained in:
1 parent
9ffa42392f
commit
93a557c322
4 files changed
+17
-4
No files matched your search
@@ -97,7 +97,13 @@ pub fn init(level: Level) -> Result<(), SetGlobalDefaultError> {
|
||||
|
||||
#[cfg(not(target_arch = "wasm32"))]
|
||||
{
|
||||
let sub = tracing_subscriber::FmtSubscriber::builder().with_max_level(level);
|
||||
let sub = tracing_subscriber::FmtSubscriber::builder()
|
||||
.with_max_level(level)
|
||||
.with_env_filter(
|
||||
tracing_subscriber::EnvFilter::builder()
|
||||
.with_default_directive(level.into())
|
||||
.from_env_lossy(),
|
||||
);
|
||||
|
||||
if !dioxus_cli_config::is_cli_enabled() {
|
||||
return set_global_default(sub.finish());
|
||||
|
||||
Reference in new issue
Block a user