Closed Veetaha closed 4 years ago
Already possible for TermLogger
! You can initialize it with a TerminalMode
, which can either be stdout/stderr or mixed-mode.
You could also manually initialize WriteLogger
with any type implementing Write
, which also applies to std::io::Stderr
. But you would miss out on colored output.
Only SimpleLogger
just uses println!
internally and will always write to stdout.
But I would accept a PR to make SimpleLogger
configurable (similar to TermLogger
) to use eprintln!
instead.
Oh, I think I have mistaken this project with https://github.com/borntyping/rust-simple_logger
The issue is that simplelog.rs
unconditionally depends on chrono
, but I would like a logger with 0 dependencies which outputs to stderr...
Well, I would certainly accept a PR, that makes chrono optional and just disables time-formatting/output, if you are interested.
Anyway, I guess the original issue is resolved. Feel free to open another one on the subject, if needed.
Hi, this crate is a perfect low-overhead logger implementation I want. However, from my point of view, human-readable logs should go to
stderr
instead ofstdout
. Would it be possible to add some configuration to selectstderr
orstdout
output for the crate? Maybe through a cargo feature or via an init function?