rust-lang / log

Logging implementation for Rust
https://docs.rs/log
Apache License 2.0
2.17k stars 250 forks source link

log crate does not support logging #501

Closed mabushey closed 2 years ago

mabushey commented 2 years ago

It's quite confusing that this is a crate for printing, NOT logging. Could logging to a log file be added, or is there a better crate for logging?

sfackler commented 2 years ago

I don't understand your question. Can you clarify a) what printing this crate is doing, and b) how logging differs from printing?

Thomasdezeeuw commented 2 years ago

@mabushey do mean the log crate doesn't do anything by default? This is on purpose as it only provides a standardised interface. If your looking for an implementation see https://github.com/rust-lang/log#in-executables.

KodrAus commented 2 years ago

As @Thomasdezeeuw suggested it sounds like the In Executables section of the README is what you're looking for that calls out various logging backends for the console, files, databases etc.