libobs, UI: Fix --verbose logging for stdout

Verbosity of stdout was previously hardcoded to INFO, while log viewer
and log files had correct verbosity. This makes the behavior of
--verbose make sense in all places.
This commit is contained in:
tt2468
2022-04-09 16:48:37 -07:00
committed by Jim
parent 3d7663f417
commit af67ef8e57
2 changed files with 25 additions and 30 deletions
+9 -6
View File
@@ -389,21 +389,24 @@ static void do_log(int log_level, const char *msg, va_list args, void *param)
OutputDebugStringW(wide_buf.c_str());
}
}
#else
def_log_handler(log_level, msg, args2, nullptr);
va_end(args2);
#endif
if (log_level <= LOG_INFO || log_verbose) {
if (too_many_repeated_entries(logFile, msg, str))
return;
LogStringChunk(logFile, str, log_level);
#ifndef _WIN32
def_log_handler(log_level, msg, args2, nullptr);
#endif
if (!too_many_repeated_entries(logFile, msg, str))
LogStringChunk(logFile, str, log_level);
}
#if defined(_WIN32) && defined(OBS_DEBUGBREAK_ON_ERROR)
if (log_level <= LOG_ERROR && IsDebuggerPresent())
__debugbreak();
#endif
#ifndef _WIN32
va_end(args2);
#endif
}
#define DEFAULT_LANG "en-US"