File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -72,14 +72,16 @@ int main(int argc, char* argv[])
7272 // If on Windows, and not run from a console
7373 // remove the stdout log sink that would otherwise spawn a console on startup
7474 #ifdef _WIN32
75- if (getenv (" PROMPT" ) != nullptr )
76- LogDebug (" Startup: skipping stdout log sink since not run from a console\n " );
75+ if (GetConsoleWindow ()) == NULL )
76+ LogNotice (" Startup: skipping stdout log sink since not run from a console (no console window)\n " );
77+ else if (getenv (" PROMPT" ) != nullptr )
78+ LogNotice (" Startup: skipping stdout log sink since not run from a console (no prompt)\n " );
7779 else
7880 {
7981 #endif
8082 g_log_sinks.push_back (make_unique<ColoredSTDLogSink>(console_verbosity));
8183 #ifdef _WIN32
82- LogDebug (" Startup: run from a console, keeping stdout log sink attached\n " );
84+ LogNotice (" Startup: run from a console, keeping stdout log sink attached\n " );
8385 }
8486 #endif
8587
You can’t perform that action at this time.
0 commit comments