fix: small bugs in running scripts and set default log level
This commit is contained in:
@@ -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?;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user