mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-05 04:06:08 -05:00
log: simplify Boolean logic for setting "colorize" var in log_init()
This commit is contained in:
parent
f84320b5d6
commit
ed0ef4bb1d
1 changed files with 1 additions and 1 deletions
2
log.c
2
log.c
|
|
@ -40,7 +40,7 @@ log_init(enum log_colorize _colorize, bool _do_syslog,
|
|||
[LOG_FACILITY_DAEMON] = LOG_DAEMON,
|
||||
};
|
||||
|
||||
colorize = _colorize == LOG_COLORIZE_NEVER ? false : _colorize == LOG_COLORIZE_ALWAYS ? true : isatty(STDERR_FILENO);
|
||||
colorize = _colorize == LOG_COLORIZE_ALWAYS || (_colorize == LOG_COLORIZE_AUTO && isatty(STDERR_FILENO));
|
||||
do_syslog = _do_syslog;
|
||||
log_level = _log_level;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue