2024-05-11 16:37:41 +00:00
|
|
|
use std::process;
|
|
|
|
|
|
|
|
use alert_me::{cli::Cli, logging};
|
|
|
|
use clap::Parser;
|
|
|
|
use tracing::error;
|
|
|
|
|
|
|
|
#[tokio::main]
|
|
|
|
async fn main() {
|
|
|
|
logging::setup("alert_me");
|
|
|
|
|
|
|
|
let args = Cli::parse();
|
|
|
|
let config = args.into();
|
|
|
|
|
|
|
|
if let Err(e) = alert_me::run(config).await {
|
2024-05-11 16:51:55 +00:00
|
|
|
error!("Application error: {e:?}");
|
2024-05-11 16:37:41 +00:00
|
|
|
process::exit(1);
|
|
|
|
}
|
|
|
|
}
|