Skip to main content

Module logging

Module logging 

Source
Expand description

Shared logger setup for the workspace.

The progress-bar style and the single MULTI_PROGRESS now live in legume_numeric::matrix::progress — the lowest common dependency, so data-beans and friends can share them without a dependency cycle (this crate depends on data-beans, so the primitive can’t live here). This module re-exports new_progress_bar, new_spinner, and MULTI_PROGRESS so every existing caller (data_beans::aux::logging::new_progress_bar, senna, graph-embedding-util) keeps working unchanged, and adds init_logger, which wraps env_logger in indicatif_log_bridge so log output renders above the bars instead of corrupting them.

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.