logcontrol-tracing

Crates.iologcontrol-tracing
lib.rslogcontrol-tracing
version0.2.0
sourcesrc
created_at2023-09-30 12:26:01.526889
updated_at2023-09-30 17:39:59.202656
descriptionTracing backend for the log control interface
homepagehttps://github.com/swsnr/logcontrol.rs
repositoryhttps://github.com/swsnr/logcontrol.rs.git
max_upload_size
id988612
size19,575
Sebastian Wiesner (swsnr)

documentation

https://docs.rs/logcontrol-tracing

README

logcontrol-tracing

Crates.io docs.rs

tracing implementation for the logcontrol interface.

Usage

$ cargo add logcontrol-tracing
use logcontrol::*;
use logcontrol_tracing::*;
use tracing_subscriber::prelude::*;

let (control, layer) = TracingLogControl1::new_auto(
    PrettyLogControl1LayerFactory,
    tracing::Level::INFO,
).unwrap();

let subscriber = tracing_subscriber::Registry::default().with(layer);
tracing::subscriber::set_global_default(subscriber).unwrap();
// Then register `control` over DBus, e.g. via `logcontrol_zbus::LogControl1`.
Commit count: 84

cargo fmt