log – Rust's logging facade
The log crate comes from the rust-lang nursery organization on GitHub and is managed by the community at https://github.com/rust-lang-nursery/log. It provides separate macros for logging at different log levels such as error!, warn!, info!, debug!, and trace!, in the order of the most priority to the least priority. These macros are major points of interaction for consumers of this crate. They internally call the log! macro in this crate, which does all the bookkeeping such as checking for the log level and formatting log messages. The core component of this crate is the log trait that other backend crates implement. The trait defines operations that are required for a logger and has other APIs, such as for checking ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access