mirror of
https://github.com/rust-lang/log.git
synced 2026-03-13 17:37:53 +00:00
Replaced my_logger with env_logger in docs
This commit is contained in:
parent
eb90d0e2ad
commit
5c6ad56dfd
11
src/lib.rs
11
src/lib.rs
@ -78,13 +78,16 @@
|
||||
//! ```rust,ignore
|
||||
//! #[macro_use]
|
||||
//! extern crate log;
|
||||
//! extern crate my_logger;
|
||||
//! extern crate env_logger;
|
||||
//!
|
||||
//! fn main() {
|
||||
//! my_logger::init();
|
||||
//!
|
||||
//! env_logger::init().unwrap();
|
||||
//!
|
||||
//! // Set the RUST_LOG level prior to running the binary
|
||||
//! // (see https://doc.rust-lang.org/log/env_logger/index.html)
|
||||
//! info!("starting up");
|
||||
//!
|
||||
//! error!("error: {}", 404);
|
||||
//!
|
||||
//! // ...
|
||||
//! }
|
||||
//! ```
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user