cosmic-session/src/main.rs

29 lines
653 B
Rust
Raw Normal View History

2022-06-22 12:22:30 -04:00
// SPDX-License-Identifier: GPL-3.0-only
2022-06-22 14:09:59 -04:00
#[macro_use]
extern crate tracing;
mod process;
2022-06-22 12:22:30 -04:00
use color_eyre::{eyre::WrapErr, Result};
use tracing::metadata::LevelFilter;
use tracing_subscriber::{fmt, prelude::*, EnvFilter};
#[tokio::main(flavor = "current_thread")]
async fn main() -> Result<()> {
color_eyre::install().wrap_err("failed to install color_eyre error handler")?;
tracing_subscriber::registry()
.with(fmt::layer())
.with(
EnvFilter::builder()
.with_default_directive(LevelFilter::INFO.into())
.from_env_lossy(),
)
.try_init()
2022-06-22 14:09:59 -04:00
.wrap_err("failed to ianitialize logger")?;
info!("Starting cosmic-session");
2022-06-22 12:22:30 -04:00
Ok(())
}