Crates.io | logcontrol-tracing |
lib.rs | logcontrol-tracing |
version | 0.2.0 |
source | src |
created_at | 2023-09-30 12:26:01.526889 |
updated_at | 2023-09-30 17:39:59.202656 |
description | Tracing backend for the log control interface |
homepage | https://github.com/swsnr/logcontrol.rs |
repository | https://github.com/swsnr/logcontrol.rs.git |
max_upload_size | |
id | 988612 |
size | 19,575 |
tracing
implementation for the logcontrol interface.
$ 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`.