Redraw whenever a message is logged
This commit is contained in:
parent
fa746d0749
commit
e0db158ece
4 changed files with 48 additions and 20 deletions
|
|
@ -17,7 +17,7 @@ use crate::logger::Logger;
|
|||
|
||||
#[tokio::main]
|
||||
async fn main() -> anyhow::Result<()> {
|
||||
let logger = Logger::init(log::Level::Debug);
|
||||
let (logger, logger_rx) = Logger::init(log::Level::Debug);
|
||||
info!(
|
||||
"Welcome to {} {}",
|
||||
env!("CARGO_PKG_NAME"),
|
||||
|
|
@ -31,7 +31,7 @@ async fn main() -> anyhow::Result<()> {
|
|||
|
||||
let mut terminal = Terminal::new()?;
|
||||
// terminal.set_measuring(true);
|
||||
Ui::run(&mut terminal, logger.clone()).await?;
|
||||
Ui::run(&mut terminal, logger, logger_rx).await?;
|
||||
drop(terminal); // So the vault can print again
|
||||
|
||||
vault.close().await;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue