Use log/env_logger
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
This commit is contained in:
parent
f0e921ebfd
commit
8f1e63b108
2 changed files with 5 additions and 0 deletions
|
@ -9,5 +9,7 @@ description = "Keep track of your Hanabi plays and analyse them"
|
||||||
[dependencies]
|
[dependencies]
|
||||||
chrono = "0.4.20"
|
chrono = "0.4.20"
|
||||||
clap = { version = "3.2.16", features = ["derive"] }
|
clap = { version = "3.2.16", features = ["derive"] }
|
||||||
|
env_logger = "0.9.0"
|
||||||
|
log = "0.4.17"
|
||||||
nom = "7.1.1"
|
nom = "7.1.1"
|
||||||
rustyline = "10.0.0"
|
rustyline = "10.0.0"
|
||||||
|
|
|
@ -28,6 +28,7 @@ use std::io::Write;
|
||||||
|
|
||||||
use chrono::{DateTime, Utc};
|
use chrono::{DateTime, Utc};
|
||||||
use clap::Parser;
|
use clap::Parser;
|
||||||
|
use env_logger;
|
||||||
use rustyline::{error::ReadlineError, Editor};
|
use rustyline::{error::ReadlineError, Editor};
|
||||||
|
|
||||||
fn write_header(filename: &str, players: u8, variants: Vec<Variant>) -> Result<(), Error> {
|
fn write_header(filename: &str, players: u8, variants: Vec<Variant>) -> Result<(), Error> {
|
||||||
|
@ -56,6 +57,8 @@ fn write_actions(filename: &str, action: GameAction) -> Result<(), Error> {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn main() -> Result<(), Error> {
|
fn main() -> Result<(), Error> {
|
||||||
|
env_logger::init();
|
||||||
|
|
||||||
let args = Args::parse();
|
let args = Args::parse();
|
||||||
println!(
|
println!(
|
||||||
"Hanabi - Players: {} - Variants: {}",
|
"Hanabi - Players: {} - Variants: {}",
|
||||||
|
|
Loading…
Reference in a new issue