fix: small bugs in running scripts and set default log level

This commit is contained in:
2025-03-03 23:22:31 +01:00
parent 3510750c55
commit f98b48667c
6 changed files with 93 additions and 8 deletions

View File

@@ -1,3 +1,6 @@
use tracing::level_filters::LevelFilter;
use tracing_subscriber::EnvFilter;
pub mod cli;
pub mod model;
pub mod plan_reconciler;
@@ -7,7 +10,14 @@ pub mod state;
#[tokio::main]
async fn main() -> anyhow::Result<()> {
dotenvy::dotenv().ok();
tracing_subscriber::fmt::init();
tracing_subscriber::fmt()
.with_env_filter(
EnvFilter::builder()
.with_default_directive(LevelFilter::WARN.into())
.with_env_var("FOREST_LOG_LEVEL")
.from_env()?,
)
.init();
cli::execute().await?;