Closed max-wittig closed 5 years ago
This is the reason, why TermLogger
is the only one to return a Result on initializing.
It is only compatible with interactive terminals not with a normal stdout/err pipe. For that use-case you should fallback to an SimpleLogger
or a WriteLogger
initialized with an Stdout
.
Use can test this, by trying to initialize a TermLogger
and fallback in case of an error instead of using unwrap
.
I hope this helps.
@Drakulix Thanks for your help!
Maybe I'm doing something wrong. Not sure, but when I'm using a debian docker image with my rust binary and simplelog, I get this error message. See code and trace below.
Everything works just fine, when not using docker in
non-interactive
mode. I'm not sure, if the library should handle the case, when something is runningnon-interactive
?