Crates.io | tracing-orchestra |
lib.rs | tracing-orchestra |
version | 0.2.1 |
source | src |
created_at | 2023-09-07 08:09:16.446339 |
updated_at | 2023-09-12 12:39:50.192614 |
description | Give me more instruments! |
homepage | https://github.com/megumish/tracing-orchestra |
repository | https://github.com/megumish/tracing-orchestra.git |
max_upload_size | |
id | 965943 |
size | 3,258 |
Have you ever found it tedious to attach #[tracing::instrument]
to each function one by one? That's where #[tracing_orchestra::instrument]
comes in!
#[tracing_orchestra::orchestra]
allows you to attach what would have been #[tracing::instrument]
on each function, to the impl
block instead.
[dependencies]
tracing-orchestra = "0.1"
use tracing_orchestra::orchestra;
// default instrument value is here!
#[orchestra::(level = "trace")]
impl Foo {
fn bar() {}
// override tracing::instrument
#[tracing::instrument(level = "info")]
fn baz() {}
}
#[tracing::instrument]
to functions.#[tracing::instrument]
.
#[tracing::instrument]
.#[tracing::instrument]
.Because there are a lot of instruments.
MIT