mirror of
https://github.com/eternal-flame-AD/unitdc-rs.git
synced 2024-11-24 03:26:43 -06:00
add env_logger in cli version
This commit is contained in:
parent
624b6fb8c9
commit
9ace779326
2 changed files with 2 additions and 0 deletions
|
@ -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 = "../../" }
|
||||
|
|
|
@ -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),
|
||||
|
|
Loading…
Reference in a new issue