Crates.io | tracing-orchestra-macros |
lib.rs | tracing-orchestra-macros |
version | 0.2.0 |
source | src |
created_at | 2023-09-07 08:07:42.307627 |
updated_at | 2023-09-12 11:58:57.556479 |
description | Give me more instruments! |
homepage | https://github.com/megumish/tracing-orchestra |
repository | https://github.com/megumish/tracing-orchestra.git |
max_upload_size | |
id | 965941 |
size | 6,931 |
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