Switch to using tracing instead of logging.
This commit is contained in:
parent
6aa656127e
commit
e0a9c49e9f
@ -11,8 +11,8 @@ path = "src/main.rs"
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[dependencies]
|
||||
log = "0.4.17"
|
||||
nom = "7.1.1"
|
||||
pretty_env_logger = "0.4.0"
|
||||
tracing = "0.1.37"
|
||||
tracing-subscriber = "0.3.16"
|
||||
|
||||
[features]
|
||||
|
@ -5,7 +5,8 @@ mod parser;
|
||||
const TEST_DOC: &'static str = include_str!("../toy_language.txt");
|
||||
|
||||
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
pretty_env_logger::init();
|
||||
let subscriber = tracing_subscriber::FmtSubscriber::new();
|
||||
tracing::subscriber::set_global_default(subscriber)?;
|
||||
println!("{}\n\n\n", TEST_DOC);
|
||||
println!("{:#?}", document(TEST_DOC));
|
||||
Ok(())
|
||||
|
Loading…
Reference in New Issue
Block a user