Skip to content

Commit 191261b

Browse files
nipunn1313Convex, Inc.
authored and
Convex, Inc.
committed
Set RUST_LOG=info as a default (#23925)
Set for all executables, rather than specifically for local-backend GitOrigin-RevId: c0754eeabcedd72b6eb13dc271a132ee1c31d721
1 parent b0e9358 commit 191261b

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

Justfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ set positional-arguments
2020

2121
# (*) Run the open source convex backend on port 3210
2222
run-local-backend *ARGS:
23-
RUST_LOG=${RUST_LOG:-info} cargo run -p local_backend --bin convex-local-backend -- "$@"
23+
cargo run -p local_backend --bin convex-local-backend -- "$@"
2424

2525
# Uses an admin key from admin_key.txt for dev backends.
2626
# This uses the default admin key for local backends, which is safe as long as the backend is

crates/cmd_util/src/env.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,9 @@ pub fn config_tool() -> TracingGuard {
8787
.boxed(),
8888
};
8989
let stdout = format_layer
90-
.with_filter(tracing_subscriber::EnvFilter::from_default_env())
90+
.with_filter(
91+
tracing_subscriber::EnvFilter::try_from_default_env().unwrap_or(EnvFilter::new("info")),
92+
)
9193
.boxed();
9294
layers.push(stdout);
9395

crates/local_backend/src/main.rs

-3
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,6 @@ use tokio::signal::{
3737
};
3838

3939
fn main() -> Result<(), MainError> {
40-
if std::env::var_os("RUST_LOG").is_none() {
41-
std::env::set_var("RUST_LOG", "info");
42-
}
4340
tracing::info!("Starting a local backend");
4441
let _guard = config_tool();
4542
let config = LocalConfig::parse();

0 commit comments

Comments
 (0)