Skip to content

Commit

Permalink
Configure env_logger manually
Browse files Browse the repository at this point in the history
  • Loading branch information
adzialocha committed Aug 30, 2023
1 parent bcf0fbb commit 17a7450
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions aquadoggo_cli/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,24 @@ use std::convert::TryInto;

use anyhow::Context;
use aquadoggo::{AllowList, Configuration, Node};
use log::warn;
use env_logger::WriteStyle;
use log::{warn, LevelFilter};

use crate::config::{load_config, print_config};
use crate::key_pair::{generate_ephemeral_key_pair, generate_or_load_key_pair};

#[tokio::main]
async fn main() -> anyhow::Result<()> {
env_logger::init();

// Load configuration from command line arguments, environment variables and .toml file
let (config_file_path, config) = load_config().context("Could not load configuration")?;

// Configure log level
let mut builder = env_logger::Builder::new();
builder
.filter(Some("aquadoggo"), LevelFilter::Info)
.write_style(WriteStyle::Always)
.init();

// Convert to `aquadoggo` configuration format and check for invalid inputs
let node_config = config
.clone()
Expand Down

0 comments on commit 17a7450

Please sign in to comment.