1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
//! Tracing compatibility layer.
//!
//! Re-exports `tracing`'s `debug!`, `info!`, `warn!`, `error!` macros when
//! the `tracing` feature is enabled and provides no-op stand-ins when it
//! is not. Callers `use crate::tracing_compat::{debug, info, warn, error}`
//! and write feature-agnostic code; the no-op variants compile to nothing.
//!
//! The `#[tracing::instrument(...)]` attribute is gated separately at the
//! call site via `#[cfg_attr(feature = "tracing", tracing::instrument(...))]`
//! because attributes cannot be re-exported.
//!
//! # Internal-only `__tracing_noop` macro
//!
//! When the `tracing` feature is **disabled**, the no-op fallback defines a
//! `__tracing_noop` macro at the crate root using `#[macro_export]`. This
//! is necessary because `macro_rules!` has no other mechanism for
//! cross-module visibility — `pub(crate) macro_rules!` is not valid syntax
//! and module-scoped `macro_rules!` cannot be `use`d from sibling modules.
//!
//! `__tracing_noop` carries `#[doc(hidden)]` and the leading-underscore name
//! signals internal-use-only. **It is NOT part of the public API.** Downstream
//! consumers MUST NOT depend on it; its name, signature, or existence may
//! change without a semver bump — in particular when the `tracing` crate
//! ships a major-version upgrade that changes its own macro shape.
//!
//! The `cargo public-api` snapshot in `core/PUBLIC-API.txt` (regenerated by
//! `core/tests/public_api_snapshot.rs`) tracks `tracing_compat`-adjacent
//! symbols so accidental surface expansion trips CI.
pub use ;
pub use ;