mirror of
https://github.com/outbackdingo/UltraGrid.git
synced 2026-03-21 13:40:21 +00:00
logging: Call preinit before parsing log config
Since help text containing ANSI escape codes can be shown during parsing (i.e. on error or help text), preinit should be called sooner
This commit is contained in:
@@ -300,10 +300,8 @@ bool parse_log_cfg(const char *conf_str,
|
||||
return false;
|
||||
}
|
||||
|
||||
void Logger::preinit(bool skip_repeated, log_timestamp_mode show_timestamps)
|
||||
void Logger::preinit()
|
||||
{
|
||||
Logger::skip_repeated = skip_repeated;
|
||||
Logger::show_timestamps = show_timestamps;
|
||||
if (rang::rang_implementation::supportsColor()
|
||||
&& rang::rang_implementation::isTerminal(std::cout.rdbuf())
|
||||
&& rang::rang_implementation::isTerminal(std::cerr.rdbuf())) {
|
||||
|
||||
Reference in New Issue
Block a user