configure

Function configure 

Source
pub fn configure(log_level: &str, with_timestamps: bool)
Expand description

Configure the global tracing subscriber and bridge log:: calls into it.

log_level is an EnvFilter directive string, e.g. "info", "debug", or "manta=debug,hyper=warn". Falls back to "error" on parse failure.

with_timestamps controls whether each emitted line is prefixed with the local time. The long-running server enables this so operators can correlate events across requests; the interactive CLI disables it to keep terminal output uncluttered.

Call this exactly once per process; subsequent calls are no-ops (the subscriber is global and init() is idempotent-ish — it panics on a second install, so guard with OnceCell if you need to re-configure).

§Examples

Typical CLI startup — no timestamps, simple level:

use manta_shared::common::log_ops;

log_ops::configure("info", false);
tracing::info!("manta-cli starting");

Server startup with per-target filtering:

use manta_shared::common::log_ops;

log_ops::configure("manta=debug,hyper=warn,tower_http=info", true);