slog
slog copied to clipboard
slog-term does aggressive isatty check for color support leading to potential issues
Context: Our test runner uses test log paths that exceed windows MAXPATH (260). When stdout is routed to such a path, the isatty check fails due to an upstream dependency bug - https://github.com/softprops/atty/issues/34
I tried disabling color in such cases by setting force_plain
. Unfortunately, since the test uses unwrap_or
instead of unwrap_or_else
, the tty check is still executed.
it would be nice if this was made lazy.
https://github.com/slog-rs/term/blob/d5d78e87cf0f40cadc927de439e3b1c4e1373810/src/lib.rs#L1259
Indeede! PR please. :)