Expand description

See IndicatifLayer for the main documentation.

An easy quick start for this crate is:

use tracing_subscriber::layer::SubscriberExt;
use tracing_subscriber::util::SubscriberInitExt;
use tracing_indicatif::IndicatifLayer;

let indicatif_layer = IndicatifLayer::new();

tracing_subscriber::registry()
    .with(tracing_subscriber::fmt::layer().with_writer(indicatif_layer.get_stderr_writer()))
    .with(indicatif_layer)
    .init();

And see the examples folder for examples of how to customize the layer / progress bar appearance.

It is highly recommended you pass indicatif_layer.get_stderr_writer() or indicatif_layer.get_stdout_writer() to your fmt::layer() (depending on where you want to emit tracing logs) to prevent progress bars from clobbering any console logs.

Re-exports

Modules

  • Provides a rudimentary filter layer that can be used to selectively enable progress bars on a per-span level.
  • Helpers to modify a progress bar associated with a given span.
  • Provides some general tracing utilities that are useful for this crate, for example a utility to filter “indicatif.pb_show” and “indicatif.pb_hide” from printing spans.
  • Helpers to prevent progress bars from clobbering your console output.

Structs

  • The layer that handles creating and managing indicatif progress bars for active spans. This layer must be registered with your tracing subscriber to have any effect.

Functions