use tasks::Tasks; use tracing::{info, instrument}; use tracing_subscriber::{filter::LevelFilter, EnvFilter}; const ANSI_CLEAR: &'static str = "\x1b[2J\x1b[1;1H"; mod config; mod gitlab; mod jira; mod tasks; #[instrument] pub fn init() { color_eyre::install().expect("Failed to install color_eyre"); setup_trace_logger(); info!("Instrumentation initialized."); } #[instrument] pub fn setup_trace_logger() { let filter = EnvFilter::builder() .with_default_directive(LevelFilter::TRACE.into()) .parse_lossy("trace,tasks=trace"); tracing_subscriber::fmt().with_env_filter(filter).init(); } #[tokio::main] async fn main() -> Result<(), anyhow::Error> { init(); tracing::info!("{ANSI_CLEAR}Hallo, mate!"); let tasks = Tasks::try_new()?; let gitlab_user = tasks.gitlab.me().await?; info!("{gitlab_user:#?}"); Ok(()) }