taskr/src/main.rs

33 lines
696 B
Rust

#![warn(clippy::all)]
mod cli;
mod client;
mod config;
mod gitlab;
mod jira;
mod observe;
mod prelude;
mod result;
mod task;
mod tasks;
mod tui;
use crate::cli::Cli;
use crate::prelude::*;
#[tokio::main]
async fn main() -> Result<()> {
observe::setup_error_handling()?;
let cli = Cli::new();
// this guard causes logs to be flushed when dropped (which is at the end of
// this function which would be the end of our program)
// https://docs.rs/tracing-appender/latest/tracing_appender/non_blocking/struct.WorkerGuard.html
let _log_guard = observe::setup_logging(&cli.logs_directory, &cli.tracing_env_filter)?;
info!("Starting taskr...");
cli.exec().await
}