Expand description
A logger to be used in build scripts.
Allows logging through the log crate within a build script. Log messages are displayed as
Cargo warning
messages.
§Usage
To use build_logger, initialize it by calling init(). After this, using the log
crate’s logging facade will display as warnings through Cargo.
//! build.rs
fn main() {
build_logger::init().expect("could not initialize build_logger");
log::info!("Hello, world!");
}Functions§
- init
- Initialize the logger.