use std::io::prelude::*;
use std::process;
use meadows::io;
use meadows::process::ExecType;
use meadows::process_error;
use meadows::tracing::config;
use meadows::tracing::config::Config;
use tracing::info;
use tracing::instrument;
#[instrument(ret)]
fn run() -> anyhow::Result<()> {
let mut stdout = io::stdout();
writeln!(stdout, "This is meadows-log")?;
info!("A log message");
Ok(())
}
fn main() -> anyhow::Result<()> {
config::init(&Config::new(ExecType::Example));
if let Err(err) = run() {
process_error!(io::stdout(), "{err:#}")?;
process::exit(1);
}
Ok(())
}