Added more details to log output when MaxScale receives a fatal signal.
This commit is contained in:
parent
6601dfaaa0
commit
28a6ea90c0
@ -38,6 +38,7 @@ find_package(MySQL)
|
||||
find_package(Pandoc)
|
||||
find_package(TCMalloc)
|
||||
find_package(Jemalloc)
|
||||
find_package(Git)
|
||||
find_package(CURL)
|
||||
# You can find the variables set by this in the FindCURL.cmake file
|
||||
# which is a default module in CMake.
|
||||
@ -56,6 +57,18 @@ else()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(GIT_FOUND)
|
||||
message(STATUS "Found git ${GIT_VERSION_STRING}")
|
||||
execute_process(COMMAND ${GIT_EXECUTABLE} rev-list --max-count=1 HEAD
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
||||
OUTPUT_VARIABLE GIT_COMMIT)
|
||||
string(REPLACE "\n" "" MAXSCALE_COMMIT ${GIT_COMMIT})
|
||||
message(STATUS "Commit ID: ${MAXSCALE_COMMIT}")
|
||||
else()
|
||||
message(WARNING "Could not find git, MaxScale commit ID will not be resolved. Will use 'source-build' for commit ID.")
|
||||
set(MAXSCALE_COMMIT "source-build")
|
||||
endif()
|
||||
|
||||
set(CMAKE_INSTALL_RPATH ${CMAKE_INSTALL_RPATH}:${CMAKE_INSTALL_PREFIX}/${MAXSCALE_LIBDIR})
|
||||
|
||||
# Make sure the release notes for this release are present if it is a stable one
|
||||
|
@ -388,12 +388,16 @@ sigfatal_handler (int i)
|
||||
_exit(1);
|
||||
}
|
||||
fatal_handling = 1;
|
||||
|
||||
fprintf(stderr, "\n\nMaxScale received fatal signal %d\n", i);
|
||||
GATEWAY_CONF* cnf = config_get_global_options();
|
||||
fprintf(stderr, "\n\nMaxScale "MAXSCALE_VERSION" received fatal signal %d\n", i);
|
||||
|
||||
LOGIF(LE, (skygw_log_write_flush(
|
||||
LOGFILE_ERROR,
|
||||
"Fatal: MaxScale received fatal signal %d. Attempting backtrace.", i)));
|
||||
"Fatal: MaxScale "MAXSCALE_VERSION" received fatal signal %d. Attempting backtrace.", i)));
|
||||
|
||||
skygw_log_write_flush(LE,"Commit ID: "MAXSCALE_COMMIT" System name: %s "
|
||||
"Release string: %s Embedded library version: %s",
|
||||
cnf->sysname,cnf->release_string,cnf->version_string);
|
||||
|
||||
{
|
||||
void *addrs[128];
|
||||
@ -1148,7 +1152,7 @@ int main(int argc, char **argv)
|
||||
|
||||
case 'v':
|
||||
rc = EXIT_SUCCESS;
|
||||
printf("%s\n",MAXSCALE_VERSION);
|
||||
printf("MaxScale %s\n",MAXSCALE_VERSION);
|
||||
goto return_main;
|
||||
|
||||
case 'l':
|
||||
|
@ -1 +1,2 @@
|
||||
#define MAXSCALE_VERSION "@MAXSCALE_VERSION@"
|
||||
#define MAXSCALE_COMMIT "@MAXSCALE_COMMIT@"
|
||||
|
Loading…
x
Reference in New Issue
Block a user