Skip to content

Commit

Permalink
util-debug: don't colorize if a redirect is used
Browse files Browse the repository at this point in the history
It is better to disable the color mode when a redirect of stderr
is done to avoid getting colorized output in the generated file.
  • Loading branch information
regit authored and victorjulien committed Oct 8, 2015
1 parent 4d83318 commit 6572725
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/util-debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 6572725

Please sign in to comment.