diff --git a/CMakeLists.txt b/CMakeLists.txt index 6487276..5d20ff5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -72,8 +72,14 @@ IF (${VERSION}.x STREQUAL ".x") MESSAGE("Extracting git software version") execute_process(COMMAND bash "-c" "git rev-list --branches HEAD | wc -l | tr -d ' ' | tr -d '\n'" OUTPUT_VARIABLE GIT_VERSION) SET(MINOR_VERSION 3) - SET(BUILD_NUMBER ${GIT_VERSION}) - SET(VERSION ${MAJOR_VERSION}.${MINOR_VERSION}.${BUILD_NUMBER}) + math(EXPR VERSION-BASE ${GIT_VERSION}/255) + math(EXPR VERSION-REMAINDER ${GIT_VERSION}%255) + message("git build version: ${GIT_VERSION}") + message("version base: ${VERSION-BASE}") + message("version remainder: ${VERSION-REMAINDER}") + # SET(BUILD_NUMBER ${GIT_VERSION}) + SET(BUILD_NUMBER ${VERSION-BASE}) + SET(VERSION ${MAJOR_VERSION}.${MINOR_VERSION}.${BUILD_NUMBER}-${VERSION-REMAINDER}) ENDIF() MESSAGE("Software Version: ${VERSION}") diff --git a/src/filesink.cpp b/src/filesink.cpp index bfe8d5c..fed5fdc 100644 --- a/src/filesink.cpp +++ b/src/filesink.cpp @@ -41,10 +41,10 @@ namespace g3 { FileSink::~FileSink() { std::string exit_msg {"g3log g3FileSink shutdown at: "}; - exit_msg.append(localtime_formatted(systemtime_now(), internal::time_formatted)).append({"\n"}); + exit_msg.append(localtime_formatted(systemtime_now(), internal::time_formatted)).append("\n"); filestream() << exit_msg << std::flush; - exit_msg.append({"Log file at: ["}).append(_log_file_with_path).append({"]\n"}); + exit_msg.append("Log file at: [").append(_log_file_with_path).append("]\n"); std::cerr << exit_msg << std::flush; } diff --git a/src/logcapture.cpp b/src/logcapture.cpp index c5dc433..44220dd 100644 --- a/src/logcapture.cpp +++ b/src/logcapture.cpp @@ -48,7 +48,7 @@ LogCapture::LogCapture(const char *file, const int line, const char *function, c : _file(file), _line(line), _function(function), _level(level), _expression(expression), _fatal_signal(fatal_signal) { if (g3::internal::wasFatal(level)) { - _stack_trace = {"\n*******\tSTACKDUMP *******\n"}; + _stack_trace = std::string{"\n*******\tSTACKDUMP *******\n"}; _stack_trace.append(g3::internal::stackdump(dump)); } } diff --git a/src/logworker.cpp b/src/logworker.cpp index 3f469d4..b6497af 100644 --- a/src/logworker.cpp +++ b/src/logworker.cpp @@ -29,7 +29,7 @@ namespace g3 { if (_sinks.empty()) { std::string err_msg {"g3logworker has no sinks. Message: ["}; - err_msg.append(uniqueMsg.get()->toString()).append({"]\n"}); + err_msg.append(uniqueMsg.get()->toString()).append("]\n"); std::cerr << err_msg; } }