diff --git a/.github/workflows/production.yml b/.github/workflows/production.yml index 69106bc..5de8a96 100644 --- a/.github/workflows/production.yml +++ b/.github/workflows/production.yml @@ -25,6 +25,7 @@ jobs: SUPABASE_ANON_KEY: ${{ secrets.PRODUCTION_ANON_KEY }} ENV: production APP_URL: https://talkbirdyto.me + RUST_LOG: error steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/staging.yml b/.github/workflows/staging.yml index df02774..8baa1a6 100644 --- a/.github/workflows/staging.yml +++ b/.github/workflows/staging.yml @@ -25,6 +25,7 @@ jobs: SUPABASE_ANON_KEY: ${{ secrets.STAGING_ANON_KEY }} ENV: staging APP_URL: https://staging.talkbirdyto.me + RUST_LOG: debug steps: - uses: actions/checkout@v4 diff --git a/app/src/main.rs b/app/src/main.rs index 1d5bf63..70fb7d1 100644 --- a/app/src/main.rs +++ b/app/src/main.rs @@ -15,7 +15,10 @@ fn main() { // Init storage dioxus_sdk::set_dir!(); // Init logger - dioxus_logger::init(Level::DEBUG).expect("failed to init logger"); + let log_level = option_env!("RUST_LOG") + .and_then(|level| level.parse().ok()) + .unwrap_or(Level::INFO); + dioxus_logger::init(log_level).expect("failed to init logger"); // launch(App) // use below until --port 3000 supported on fullstack #[allow(clippy::let_unit_value)]