/// Draws the Tui smart logger widget in the provided frame
Draws the Tui smart logger widget in the provided frame
Draws the Tui smart logger widget in the provided frame
fn draw_smart_logger(
    frame: &mut Frame<CrosstermBackend<Stdout>>,
    chunk: Rect,
    state: &TuiWidgetState,
    dispatcher: &Rc<RefCell<Dispatcher<Event>>>,
) {
    dispatcher.borrow_mut().clear();
    let selector_panel = TuiLoggerSmartWidget::default()
        .style_error(Style::default().fg(Color::Red))
        .style_debug(Style::default().fg(Color::Green))
        .style_warn(Style::default().fg(Color::Yellow))
        .style_trace(Style::default().fg(Color::Magenta))
        .style_info(Style::default().fg(Color::Cyan))
        .state(state)
        .dispatcher(dispatcher.clone());
    // These loggers are far too noisy and don't provide any value to a wasmcloud user
    set_level_for_target("tui_logger::dispatcher", LevelFilter::Off);
    set_level_for_target("mio::poll", LevelFilter::Off);
    set_level_for_target("mio::sys::unix::kqueue", LevelFilter::Off);
    set_level_for_target("polling", LevelFilter::Off);
    set_level_for_target("polling::kqueue", LevelFilter::Off);
    set_level_for_target("async_io::driver", LevelFilter::Off);
    set_level_for_target("async_io::reactor", LevelFilter::Off);
    frame.render_widget(selector_panel, chunk);
}
fn draw_smart_logger ( frame : & mut Frame < CrosstermBackend < Stdout > > , chunk : Rect , state : & TuiWidgetState , dispatcher : & Rc < RefCell < Dispatcher < Event > > > , ) { dispatcher . borrow_mut ( ) . clear ( ) ; let selector_panel = TuiLoggerSmartWidget :: default ( ) . style_error ( Style :: default ( ) . fg ( Color :: Red ) ) . style_debug ( Style :: default ( ) . fg ( Color :: Green ) ) . style_warn ( Style :: default ( ) . fg ( Color :: Yellow ) ) . style_trace ( Style :: default ( ) . fg ( Color :: Magenta ) ) . style_info ( Style :: default ( ) . fg ( Color :: Cyan ) ) . state ( state ) . dispatcher ( dispatcher . clone ( ) ) ; // These loggers are far too noisy and don't provide any value to a wasmcloud user set_level_for_target ( " " , LevelFilter :: Off ) ; set_level_for_target ( " " , LevelFilter :: Off ) ; set_level_for_target ( " " , LevelFilter :: Off ) ; set_level_for_target ( " " , LevelFilter :: Off ) ; set_level_for_target ( " " , LevelFilter :: Off ) ; set_level_for_target ( " " , LevelFilter :: Off ) ; set_level_for_target ( " " , LevelFilter :: Off ) ; frame . render_widget ( selector_panel , chunk ) ; }
Draws the Tui smart logger widget in the provided frame
Draws the Tui smart logger widget in the provided frame
frame
&mut Frame<CrosstermBackend<Stdout>>
chunk
Rect
state
&TuiWidgetState
dispatcher
&Rc<RefCell<Dispatcher<Event>>>