util-debug: don't colorize if a redirect is used

It is better to disable the color mode when a redirect of stderr
is done to avoid getting colorized output in the generated file.
pull/1675/head
Eric Leblond 11 years ago committed by Victor Julien
parent 4d83318b46
commit 6572725a7a

@ -776,7 +776,7 @@ static inline SCLogOPIfaceCtx *SCLogInitConsoleOPIface(const char *log_format,
}
iface_ctx->log_level = tmp_log_level;
if (isatty(fileno(stdout))) {
if (isatty(fileno(stdout)) && isatty(fileno(stderr))) {
iface_ctx->use_color = TRUE;
}

Loading…
Cancel
Save