Crates.io | log4r |
lib.rs | log4r |
version | 0.1.1 |
source | src |
created_at | 2022-04-30 13:53:40.993266 |
updated_at | 2022-04-30 13:56:47.437152 |
description | Stupidly simple logging utils |
homepage | |
repository | https://github.com/WouterPennings/logr |
max_upload_size | |
id | 578155 |
size | 6,060 |
A stupidly simple logging package for Rust.
The main advantage of log4r over log is the use of functions
instead of macros. This way you can disallow them in clippy.toml
, making it more suitable for
debugging.
Cargo.toml
by adding log4r = 0.1.0
under your dependencies.use log4r::*;
to the top of the file.info(some_info.to_string())
If only want to use these functions during development, add the following to
your clippy.toml
in the root of you project:
disallowed-methods = [
{ path = "log4r::success", reason = "Logs are not allowed in builds" },
{ path = "log4r::warning", reason = "Logs are not allowed in builds" },
{ path = "log4r::info", reason = "Logs are not allowed in builds" },
{ path = "log4r::error", reason = "Logs are not allowed in builds" },
{ path = "log4r::critical", reason = "Logs are not allowed in builds" },
{ path = "log4r::log", reason = "Logs are not allowed in builds" },
]
When you run Clippy, it will give errors/warnings over the use of these functions.