Skip to content

Commit

Permalink
fix(main): fix version printing (#2167)
Browse files Browse the repository at this point in the history
  • Loading branch information
ReenigneArcher authored Feb 24, 2024
1 parent d1a6358 commit 8074bf8
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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)) {
Expand Down

0 comments on commit 8074bf8

Please sign in to comment.