#
# Highlight important messages sent to stderr and stdout.
#
+ # Option will be ignored (disabled) if output if TERM is not
+ # an xterm or output is not to a TTY.
+ #
colourise = yes
#
}
}
+ /* Check whether it's appropriate to colourise log output */
+ p = getenv("TERM");
+ if (!(((mainconfig.radlog_dest == RADLOG_STDOUT) ||
+ (mainconfig.radlog_dest == RADLOG_STDERR)) &&
+ isatty(mainconfig.radlog_fd) && p && strstr(p, "xterm"))) {
+ mainconfig.colourise = FALSE;
+ }
+ p = NULL;
+
/* Initialize the dictionary */
cp = cf_pair_find(cs, "dictionary");
if (cp) p = cf_pair_value(cp);