Skip to content

Commit

Permalink
fix(logger): initialize after loading .env (#13)
Browse files Browse the repository at this point in the history
Initialize the logger after the .env is read to include the RUST_LOG variable in the logger's initialization.
  • Loading branch information
gregfromstl authored Feb 21, 2024
1 parent c0458f0 commit fb52f1c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/hub/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@ struct Config {

#[tokio::main]
async fn main() {
env_logger::init();

// Load env vars from .env file
dotenv().ok();

env_logger::init();

// Load configuration from a TOML file and override with environment variables
let config: Config = Figment::new()
.merge(Toml::file("Config.toml"))
Expand Down

0 comments on commit fb52f1c

Please sign in to comment.