Skip to content

Commit 624e7b6

Browse files
committed
Fix default logs
1 parent 14c7801 commit 624e7b6

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

ethereum_prover/src/main.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,16 @@ use tracing_subscriber::EnvFilter;
1010

1111
#[tokio::main]
1212
async fn main() -> anyhow::Result<()> {
13+
// Enforce default log level.
14+
if std::env::var("RUST_LOG").is_err() {
15+
unsafe {
16+
std::env::set_var("RUST_LOG", "zksync=INFO,ethereum_prover=INFO");
17+
}
18+
}
19+
1320
tracing_subscriber::fmt()
1421
.with_env_filter(
1522
EnvFilter::builder()
16-
.with_default_directive("zksync=INFO,ethereum_prover=INFO".parse().unwrap())
1723
.from_env()
1824
.context("failed to load log filter from env")?,
1925
)

0 commit comments

Comments
 (0)