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
@@ -2,6 +2,7 @@ use crate::{AppBundle, DioxusCrate, Platform, Result};
|
||||
use anyhow::Context;
|
||||
use dioxus_cli_opt::process_file_to;
|
||||
use std::{
|
||||
env,
|
||||
net::SocketAddr,
|
||||
path::{Path, PathBuf},
|
||||
process::Stdio,
|
||||
@@ -112,6 +113,10 @@ impl AppHandle {
|
||||
envs.push((dioxus_cli_config::ASSET_ROOT_ENV, base_path.clone()));
|
||||
}
|
||||
|
||||
if let Some(env_filter) = env::var_os("RUST_LOG").and_then(|e| e.into_string().ok()) {
|
||||
envs.push(("RUST_LOG", env_filter));
|
||||
}
|
||||
|
||||
// Launch the server if we were given an address to start it on, and the build includes a server. After we
|
||||
// start the server, consume its stdout/stderr.
|
||||
if let (Some(addr), Some(server)) = (start_fullstack_on_address, self.server_exe()) {
|
||||
|
||||
Reference in new issue
Block a user