]> git.mxchange.org Git - flightgear.git/blobdiff - src/Main/main.cxx
Update image-server logic.
[flightgear.git] / src / Main / main.cxx
index 2062a3796d74afb9a03b69cdfa8e9b252bcf380d..c146a14c1a5e0cb524c8692646ffed96f166251f 100644 (file)
 
 #if defined(HAVE_CRASHRPT)
        #include <CrashRpt.h>
+
+// defined in bootstrap.cxx
+extern bool global_crashRptEnabled;
+
 #endif
 
 // Class references
@@ -60,6 +64,7 @@
 #include <Viewer/renderer.hxx>
 #include <Viewer/WindowSystemAdapter.hxx>
 #include <Navaids/NavDataCache.hxx>
+#include <Include/version.h>
 
 #include "fg_commands.hxx"
 #include "fg_io.hxx"
@@ -345,7 +350,12 @@ static void logToFile()
     sglog().logToFile(logPath, SG_ALL, SG_INFO);
 
 #if defined(HAVE_CRASHRPT)
-       crAddFile2(logPath.c_str(), NULL, "FlightGear Log File", CR_AF_MAKE_FILE_COPY);
+       if (global_crashRptEnabled) {
+               crAddFile2(logPath.c_str(), NULL, "FlightGear Log File", CR_AF_MAKE_FILE_COPY);
+               SG_LOG( SG_GENERAL, SG_INFO, "CrashRpt enabled");
+       } else {
+               SG_LOG(SG_GENERAL, SG_WARN, "CrashRpt enabled at compile time but failed to install");
+       }
 #endif
 }
 
@@ -373,7 +383,9 @@ int fgMainInit( int argc, char **argv ) {
 #endif
     SG_LOG( SG_GENERAL, SG_INFO, "FlightGear:  Version "
             << version );
-    SG_LOG( SG_GENERAL, SG_INFO, "Built with " << SG_COMPILER_STR << std::endl );
+    SG_LOG( SG_GENERAL, SG_INFO, "Built with " << SG_COMPILER_STR);
+       SG_LOG( SG_GENERAL, SG_INFO, "Jenkins number/ID " << HUDSON_BUILD_NUMBER << ":"
+                       << HUDSON_BUILD_ID);
 
     // Allocate global data structures.  This needs to happen before
     // we parse command line options