Setup logging (log, env_logger)

This commit is contained in:
Mike Dilger committed 2024-02-15 09:22:02 +13:00
1 parent 4d9de16eba
commit 4fe854cdd4
3 files changed
+151 -1

No files matched your search

+4 -1
View File
@@ -10,6 +10,8 @@ use std::io::Read;
#[tokio::main]
async fn main() -> Result<(), Error> {
env_logger::init();
// Get args (config path)
let mut args = env::args();
if args.len() <= 1 {
@@ -23,8 +25,9 @@ async fn main() -> Result<(), Error> {
let mut contents = String::new();
file.read_to_string(&mut contents)?;
let config: Config = ron::from_str(&contents)?;
log::debug!("Loaded config file.");
println!("No main yet.");
log::error!("No main yet.");
Ok(())
}