Logging (#8)
- Add `Logger`, `Config` - Back to `nixos-unstable` - `nix flake update`
This commit is contained in:
15
src/main.rs
15
src/main.rs
@@ -1,7 +1,11 @@
|
||||
mod app;
|
||||
mod clock;
|
||||
mod config;
|
||||
mod constants;
|
||||
mod events;
|
||||
#[cfg(debug_assertions)]
|
||||
mod logging;
|
||||
|
||||
mod terminal;
|
||||
mod utils;
|
||||
mod widgets;
|
||||
@@ -11,11 +15,16 @@ use color_eyre::Result;
|
||||
|
||||
#[tokio::main]
|
||||
async fn main() -> Result<()> {
|
||||
color_eyre::install()?;
|
||||
let terminal = terminal::init()?;
|
||||
let config = config::Config::init()?;
|
||||
#[cfg(debug_assertions)]
|
||||
logging::Logger::new(config.log_dir).init()?;
|
||||
|
||||
color_eyre::install()?;
|
||||
|
||||
let terminal = terminal::setup()?;
|
||||
let events = events::Events::new();
|
||||
App::new().run(terminal, events).await?;
|
||||
terminal::restore()?;
|
||||
terminal::teardown()?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user