add env_logger in cli version

This commit is contained in:
ゆめ 2023-08-21 20:23:54 -05:00
parent 624b6fb8c9
commit 9ace779326
2 changed files with 2 additions and 0 deletions

View file

@ -6,4 +6,5 @@ edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
env_logger = "0.10.0"
unitdc = { path = "../../" }

View file

@ -1,6 +1,7 @@
use unitdc::interpreter::{Interpreter, Output};
fn main() {
env_logger::init();
let mut interpreter = Interpreter::new(Box::new(|output| match output {
Output::Message(e) => eprintln!("message: {}", e),
Output::Quantity(q) => println!("[0]: {}", q),