|
|
|
|
|
by csomar
2581 days ago
|
|
Are you aware that there is some logging best practices/standards in Rust? I don't mean to be a downer but I'd advice against using this library as it is right now. The reason is that you are not using the Rust Log library: https://docs.rs/log/0.4.6/log/ The good news is that you can integrate your work with the Rust Log library. Basically the difference is: instead of using your logging functions, the user will use the logging macros provided by Log. This means that they can log to the terminal using your library, to a disk file, and to a remote service. All at the same time using the same logging macros. Here is the Rust Log library description: > Libraries should link only to the log crate, and use the provided macros to log whatever information will be useful to downstream consumers. |
|
The macros are nice and all, but I’m pretty sure the author of log went out and said, yeah well, but you’d disable this in production, because it’s slow and all.
Am I wrong?
Did something change?
You certainly didn’t used to be able to have two different log implementations active in different contexts.