mirror of
https://github.com/KjellKod/g3log.git
synced 2024-12-12 10:23:50 +01:00
fix OSX/Clang build warnings and 32-bit linking errors regarding build versin (#176)
This commit is contained in:
parent
ac54350346
commit
121bb9c790
@ -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}")
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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));
|
||||
}
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user