Skip to content

Commit f7af715

Browse files
authored
Merge pull request #77 from lnicola/dash-warning
Add note about dashes
2 parents a3e25b3 + ce88416 commit f7af715

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/lib.rs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,19 @@
7070
//! INFO: 2017-11-09T02:12:24Z: main: the answer was: 12
7171
//! ```
7272
//!
73+
//! If the binary name contains hyphens, you will need to replace
74+
//! them with underscores:
75+
//!
76+
//! ```{.bash}
77+
//! $ RUST_LOG=my_app ./my-app
78+
//! DEBUG: 2017-11-09T02:12:24Z: my_app: this is a debug message
79+
//! ERROR: 2017-11-09T02:12:24Z: my_app: this is printed by default
80+
//! INFO: 2017-11-09T02:12:24Z: my_app: the answer was: 12
81+
//! ```
82+
//!
83+
//! This is because Rust modules and crates cannot contain hyphens
84+
//! in their name, although `cargo` continues to accept them.
85+
//!
7386
//! See the documentation for the [`log` crate][log-crate-url] for more
7487
//! information about its API.
7588
//!

0 commit comments

Comments
 (0)