From: James Turner Date: Mon, 20 Jan 2014 21:54:06 +0000 (+0000) Subject: Fix typo, add Hudson Build-ID to reports. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=a46114da9a2636aade20d2d44ecbf2ed71f8cb33;p=flightgear.git Fix typo, add Hudson Build-ID to reports. --- diff --git a/src/Main/bootstrap.cxx b/src/Main/bootstrap.cxx index 96b053b61..da45058d9 100644 --- a/src/Main/bootstrap.cxx +++ b/src/Main/bootstrap.cxx @@ -201,7 +201,7 @@ int main ( int argc, char **argv ) // Restart the app on crash info.dwFlags |= CR_INST_SEND_QUEUED_REPORTS; - // autoamticallty install handlers for all threads + // automatically install handlers for all threads info.dwFlags |= CR_INST_AUTO_THREAD_HANDLERS; // Define the Privacy Policy URL @@ -212,7 +212,10 @@ int main ( int argc, char **argv ) if(nResult!=0) { std::cerr << "failed to install crash reporting engine" << std::endl; } else { - crAddProperty("hudson-build-id", HUDSON_BUILD_ID); + crAddProperty("hudson-build-id", HUDSON_BUILD_ID); + char buf[16]; + ::snprintf(buf, 16, "%d", HUDSON_BUILD_NUMBER); + crAddProperty("hudson-build-number", buf); } #endif diff --git a/src/Main/main.cxx b/src/Main/main.cxx index 2062a3796..2d3c6485a 100644 --- a/src/Main/main.cxx +++ b/src/Main/main.cxx @@ -60,6 +60,7 @@ #include #include #include +#include #include "fg_commands.hxx" #include "fg_io.hxx" @@ -346,6 +347,7 @@ static void logToFile() #if defined(HAVE_CRASHRPT) crAddFile2(logPath.c_str(), NULL, "FlightGear Log File", CR_AF_MAKE_FILE_COPY); + SG_LOG( SG_GENERAL, SG_INFO, "CrashRpt enabled"); #endif } @@ -373,7 +375,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