cursive/examples/logger.rs
2019-02-22 13:55:07 -08:00

18 lines
391 B
Rust

extern crate cursive;
#[macro_use]
extern crate log;
fn main() {
cursive::logger::init();
debug!("Starting!");
let mut siv = cursive::Cursive::default();
siv.add_global_callback('q', cursive::Cursive::quit);
siv.add_global_callback('~', cursive::Cursive::toggle_debug_view);
siv.add_global_callback('l', |_| warn!("Wooo"));
error!("BAD!!!");
siv.run();
}