fix(main): fix version printing (#2167)

This commit is contained in:
ReenigneArcher 2024-02-23 20:00:53 -05:00 committed by GitHub
parent d1a635809a
commit 8074bf8c8d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -97,9 +97,6 @@ SessionMonitorWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) {
*/
int
main(int argc, char *argv[]) {
// the version should be printed to the log before anything else
BOOST_LOG(info) << PROJECT_NAME << " version: " << PROJECT_VER;
lifetime::argv = argv;
task_pool_util::TaskPool::task_id_t force_shutdown = nullptr;
@ -197,6 +194,11 @@ main(int argc, char *argv[]) {
bl::core::get()->add_sink(sink);
auto fg = util::fail_guard(log_flush);
// logging can begin at this point
// if anything is logged prior to this point, it will appear in stdout, but not in the log viewer in the UI
// the version should be printed to the log before anything else
BOOST_LOG(info) << PROJECT_NAME << " version: " << PROJECT_VER;
if (!config::sunshine.cmd.name.empty()) {
auto fn = cmd_to_func.find(config::sunshine.cmd.name);
if (fn == std::end(cmd_to_func)) {