Skip to content

Commit f22f286

Browse files
georgempbryangarza
authored andcommitted
Add additional information to references of my_crate in env_filter docs. (#1088)
Co-authored-by: Bryan Garza <[email protected]>
1 parent 6878d8d commit f22f286

File tree

1 file changed

+5
-0
lines changed
  • tracing-subscriber/src/filter/env

1 file changed

+5
-0
lines changed

tracing-subscriber/src/filter/env/mod.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -449,6 +449,11 @@ impl EnvFilter {
449449
/// # Ok(())
450450
/// # }
451451
/// ```
452+
/// In the above example, substitute `my_crate`, `module`, etc. with the
453+
/// name your target crate/module is imported with. This might be
454+
/// different from the package name in Cargo.toml (`-` is replaced by `_`).
455+
/// Example, if the package name in your Cargo.toml is `MY-FANCY-LIB`, then
456+
/// the corresponding Rust identifier would be `MY_FANCY_LIB`:
452457
pub fn add_directive(mut self, mut directive: Directive) -> Self {
453458
if !self.regex {
454459
directive.deregexify();

0 commit comments

Comments
 (0)