diff --git a/Cargo.toml b/Cargo.toml index 5d76b77..275e614 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,5 +9,7 @@ description = "Keep track of your Hanabi plays and analyse them" [dependencies] chrono = "0.4.20" clap = { version = "3.2.16", features = ["derive"] } +env_logger = "0.9.0" +log = "0.4.17" nom = "7.1.1" rustyline = "10.0.0" diff --git a/src/main.rs b/src/main.rs index c790118..01eb52e 100644 --- a/src/main.rs +++ b/src/main.rs @@ -28,6 +28,7 @@ use std::io::Write; use chrono::{DateTime, Utc}; use clap::Parser; +use env_logger; use rustyline::{error::ReadlineError, Editor}; fn write_header(filename: &str, players: u8, variants: Vec) -> Result<(), Error> { @@ -56,6 +57,8 @@ fn write_actions(filename: &str, action: GameAction) -> Result<(), Error> { } fn main() -> Result<(), Error> { + env_logger::init(); + let args = Args::parse(); println!( "Hanabi - Players: {} - Variants: {}",