The LOG and LOGF macros had been modified to be statement-safe, but the
LOG_IF, CHECK, LOGF_IF, CHECKF, and CHECK_F macros were all still
unsafe in face of code where single-statement blocks were not enclosed
in {}.
For example code like this:
if (!foobar)
CHECKF(goodness, "badness detected!");
else
handle_foobar(foobar);
would fail in subtle and possibly dangerous ways.
Fix this by combining multiple if-statements into a single conditional
and inverting the conditions, then adding an empty then-block and moving
the log statement to the else-block.
* Improve CMake module file
* Fix packaging on Win32
* appveyor: Test install and package target
* Travis-CI: Test install and package target
* Update documentation for working with CMake
* Simplify g3loggerConfig.cmake
* Add Doc Prerequisites section
* Restructure Build.cmake to use "modern" Cmake
Since it is deprecated to modify the global compiler flags and similar options, the Build.cmake is converted to use only per target operations.
Additionally, the checks for backtrace and Pthread lib is converted to use the in cmake included functions. Also the check for the cxa_demangle function should be more robust now.
* fixed option for performance test
* use CMAKE_CURRENT_SOURCE_DIR in git cmd-lines to get current version, for better integration as cmake subdirectory
* bump required cmake version to 3.2 and use target_compile_feature to fix OSX compiler recognition and c++14 compiler flags
* restore original sigaction in restoreSignalHandler
- Save original sigactions in a map called gSavedSigActions
- In restoreSignalHandler, do nothing if there is no saved sigaction.
If there is a saved sigaction, then re-install it.
- Fixes issue #253
* fix bug found in code review of PR #254
* add functions for reporting sigaction errors
- Factor out reportSigactionError functions from functions that
call sigaction to allow unit testing.
- Use strsignal libc function to convert from signal number to name
to eliminate chance of not finding the name in {g,k}Signals maps.
* cleanup. perror doesn't need a wrapper. put code under test
* Added thread ID configurable through API calls. Left to do g3sinks, documentation and some corner test cases for CHECK, LOG(FATAL) and FATAL signal
* improve test script, break if error
* easier to use API. Api docs added
* Update API.markdown
* Update API.markdown
* Update API.markdown
* updated readme with details for overriding default for "full details"
* updated custom sink with custom formatting example
* CMake: CMAKE_INSTALL_PREFIX for Linux
If on Linux system CMAKE_INSTALL_PREFIX is set it overrides
CPACK_PACKAGING_INSTALL_PREFIX key.
* Readme: readme for MinGW building and installation
* Update README.markdown