]> khamidou — GitHub mirrors - electron.git/commitdiff
Explicitly writes debug log to stderr
authorCheng Zhao <zcbenz@gmail.com>
Mon, 7 Sep 2015 13:44:03 +0000 (21:44 +0800)
committerCheng Zhao <zcbenz@gmail.com>
Mon, 7 Sep 2015 13:45:43 +0000 (21:45 +0800)
If we don't do this Chromium will close stdout and stderr for us,
resulting process.stdout not working.

atom/app/atom_main_delegate.cc

index 02dd11c81ba05ec722eb665999cd9f7b8988cbb2..3c7d6b2e7034ad9ec394568547fa2f4297670e78 100644 (file)
@@ -38,7 +38,9 @@ bool AtomMainDelegate::BasicStartupComplete(int* exit_code) {
 #else
   settings.logging_dest = logging::LOG_TO_SYSTEM_DEBUG_LOG;
 #endif  // defined(DEBUG)
-#endif  // defined(OS_WIN)
+#else  // defined(OS_WIN)
+  settings.logging_dest = logging::LOG_TO_SYSTEM_DEBUG_LOG;
+#endif  // !defined(OS_WIN)
   logging::InitLogging(settings);
 
   // Logging with pid and timestamp.