Skip to content

Commit

Permalink
RUST_LOG support
Browse files Browse the repository at this point in the history
Signed-off-by: Filippo Costa <[email protected]>
  • Loading branch information
neysofu committed Nov 28, 2023
1 parent d9c9ca3 commit d309988
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion examples/demo-rollup/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
use std::env;
use std::str::FromStr;

use anyhow::Context as _;
Expand Down Expand Up @@ -35,7 +36,13 @@ async fn main() -> Result<(), anyhow::Error> {
// Initializing logging
tracing_subscriber::registry()
.with(fmt::layer())
.with(EnvFilter::from_str("debug,hyper=info,risc0_zkvm=info").unwrap())
.with(
EnvFilter::from_str(
&env::var("RUST_LOG")
.unwrap_or_else(|_| "debug,hyper=info,risc0_zkvm=info".to_string()),
)
.unwrap(),
)
.init();

let args = Args::parse();
Expand Down

0 comments on commit d309988

Please sign in to comment.