Skip to main content

Module logging

Module logging 

Source
Expand description

Shared logger setup for the workspace.

Reachable as data_beans::logging and, for callers that take it with the other helpers, as data_beans::aux::logging. The progress-bar style and the single MULTI_PROGRESS are defined in legume_numeric::matrix::progress, the lowest common dependency of the workspace; this module re-exports new_progress_bar, new_spinner, and MULTI_PROGRESS from there, so every crate that draws a bar shares one set of them, and adds init_logger, which wraps env_logger in indicatif_log_bridge so log output renders above the bars instead of corrupting them. With the tui feature the logger sits behind legume-tui’s log gate, so a view’s legume_tui::logs::hold keeps records back while it owns the terminal.

Statics§

MULTI_PROGRESS
The single global MultiProgress every workspace progress bar registers with, so log output routed through indicatif_log_bridge interleaves cleanly above the bars instead of corrupting them.

Functions§

init_logger
Install env_logger wrapped in indicatif_log_bridge::LogWrapper so log messages render above any active progress bar. verbose selects between legume_numeric::matrix::common_io::{VERBOSE,QUIET}_LOG_FILTER; an external RUST_LOG still overrides the default filter.
new_progress_bar
Create a progress bar registered with the shared MULTI_PROGRESS and styled with the standard template. Attach a trailing label with ProgressBar::with_message, e.g. new_progress_bar(n).with_message("blocks"). Repaints on the shared STEADY_TICK cadence.
new_spinner
Create a spinner registered with the shared MULTI_PROGRESS for unbounded / streaming work (no known total). template is an indicatif spinner template (e.g. "{spinner} streamed {pos} fragments ({per_sec})"); the shared tick frames and the shared STEADY_TICK cadence are applied so the spinner animates and stays visually consistent across crates.