Switch to using tracing instead of logging.

This commit is contained in:
Tom Alexander 2022-11-25 17:27:29 -05:00
parent 6aa656127e
commit e0a9c49e9f
Signed by: talexander
GPG Key ID: D3A179C9A53C0EDE
2 changed files with 4 additions and 3 deletions

View File

@ -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]

View File

@ -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(())