Commit Graph

756 Commits

Author SHA1 Message Date
Kjell Hedström
9f4023c0cb
Create PULL_REQUEST_TEMPLATE.md 2018-03-30 21:20:12 -06:00
Kjell Hedström
8112f75dcf
improved runalltests (#255) 2018-03-25 23:35:52 -06:00
Jeff Ebert
408061280f restore original sigaction in restoreSignalHandler (#254)
* 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
2018-03-25 21:43:49 -06:00
Kjell Hedström
14db37ad23
G3log placeholder thread ID formatting (#248)
* 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
2018-03-08 09:16:12 -07:00
Kjell Hedström
f2b860a2b4
Addressing the std2 concern raised in https://github.com/KjellKod/g3log/issues/212 (#246) 2018-02-20 22:02:19 -07:00
Петр Шургалин
217f52fb12 CMake: CMAKE_INSTALL_PREFIX for Linux (#243)
* 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
2018-01-08 21:22:08 -07:00
Петр Шургалин
11f9f06f5c CMake: add install rule (#241)
* CMake: add MinGW install rule

* CMake: relative packaging paths
2017-12-27 13:09:40 -07:00
Kjell Hedström
c79695c387
Update CMakeLists.txt 2017-12-20 12:24:00 -07:00
Kjell Hedström
287bfc11cb
Update CMakeLists.txt 2017-12-20 12:09:41 -07:00
Петр Шургалин
a2ed65600b CMake: fix CMake version check on windows (#240)
CMake was telling that my version 3.10.1 is lesser thar 3.4
2017-12-20 10:32:36 -07:00
maj-tom
0ddfd6dccc Fix dangling else in LOG and LOGF macros (#231)
* Fix dangling else in LOG and LOGF macros
Closes #224

* added unit test
2017-12-06 21:31:55 -07:00
PeasantCodeFarmer
e7d3b9d7b1 Comment change for issue #232 (#237)
* Fixing some English/typos and a cyclical header include.

* Comment fix for issue# 232
2017-12-04 18:24:55 -07:00
Jean-Christophe Fillion-Robin
0005e14a9c cmake: Avoid extra recompilation updating generated_definitions.hpp only if needed (#235)
This commit updates the build system to ensure the generated_definitions
header is updated only if its content changed. This will avoid recompilation
if the re-configured without changing any options.
2017-12-02 17:21:56 -07:00
PeasantCodeFarmer
b4be5a0f00 Fixing some English/typos and a cyclical header include. (#234) 2017-11-22 07:41:35 -07:00
Matt Patterson
b3cb1ba057 atomicbool.hpp needs EOF outside of comment to build on VS15 (#229) 2017-10-26 18:37:37 -06:00
spinorx
28105e08d7 Support full filenames in logs. (#226)
This is helpful for doing cut and paste of filenames when opening.
Also fixed couple of macro parentheses.
2017-10-11 12:59:46 -06:00
mobileben
833b22d23b iOS Support (#183) (#198) 2017-09-26 21:33:08 -06:00
Kjell Hedsröm
96d6cda239 fixed comparison warning 2017-09-23 19:16:51 -06:00
mobileben
93c05406d8 Add in support for configurable kMaxMessageValue #203 (#208)
* Add in support for configurable kMaxMessageValue #203

* Add in documentation for USE_G3_DYNAMIC_MAX_MESSAGE_SIZE
2017-09-08 22:51:46 -06:00
maj-tom
97c6cf45b3 Update filesink.cpp (#216) 2017-07-19 13:16:50 -06:00
Thomas ten Cate
2a8ebca2d7 Remove double flushed from example (#214)
It's gone since e31c204
2017-07-13 07:01:00 -06:00
Andreas Schönle
f42611d2a1 fixed windows timestamp (#200)
* fixed windows timestamp

* ficing linux time

* Fix to_system_time

* fix last review issue.

* fixed formatting.

* Comment added to to_system_time() functiuon.:wq
2017-06-04 07:47:29 -06:00
Andreas Schönle
82df2168aa CMake messages changed to message( STATUS "..." ) (#190) 2017-05-17 14:31:19 -06:00
Andreas Schönle
ac37076327 Cross-compiling: Version readout fixed (#189)
* Cross-comoiling: Version readout fixed
Test.cmake: Path handling consistent

* ".x" syntax in variable checking removed

* Use G3LOG_DEBUG also in linux-specific code

* Fixed error when linux and shared library is on

* Fixed linux/windows shared lib handling: FATAL_ERROR for wrong cmake
version and no message in linux
2017-05-17 14:24:11 -06:00
Kjell Hedström
769feca4d0 Corrected cmake log message (#197) 2017-05-17 08:32:10 -06:00
Kjell Hedström
c08fba999b Definitions made explicit (#196)
* force definition inclusion

* to make it clear to the user
2017-05-17 08:25:29 -06:00
Jakob Wanner
24dea1ceea Cast char array to pointer to char in INTERNAL_LOG_MESSAGE (#193) 2017-05-17 08:07:39 -06:00
Andreas Schönle
123977f106 unit tests running with windows shared dll (#178)
* unit tests running with windows shared dll

* CMake automatically uses DLL runtime - remove cmake entries modifying
compiler flags

* missing DBUG vs DEBUG issue in Linux

* generated header added

* correction in CMake: Set HEADER_FILES correctly

* added static library option

* switched to powershell and included WORKING_DIRECTORY

* powershell use in windows and WORKING_DIRECTORY instead of cd

* Fixed appveyor.yml to use Release configuration and run unit tests

* trying to make appveyor work again ...

* make sure ERRORLEVEL is 0 when unit tests run successfully

* Still trying to fix appveyor ...

* Defaulting to shared library in linux, too

* Removed runtime loading test when g3log is not a shared library in linux

* Run unit tests verbosly using ctest.exe

* Disabled AggressiveThreadCallsDuringShutdown test

* Revert "Run unit tests verbosly using ctest.exe" (accidental commit)

This reverts commit b30513450d.

* re-committing valid parts of reverted commit

* DBUG vs DEBUG fix moved to generated_definitions.hpp

* cleanup shared/static option

* clarify cmake build types regardless of type

* Added compile test for DEBUG and DBUG

* put back formatting

* Removed commented out /MD switches for MSVC
2017-05-09 10:26:48 -06:00
Andreas Schönle
a1b5d97689 powershell use in windows and WORKING_DIRECTORY instead of cd (#181) 2017-05-04 14:00:17 -06:00
Kjell Hedström
613db7e346 test appveyor (#180)
* test appveyor

* fixed line issue

* extracting software version for windows too

* removed printout
2017-05-03 18:49:11 -06:00
Kjell Hedström
887673f4d0 Time adjustments for VMs and 32-bit embedded (#177)
* in progress. now using std::chrono

* in progress, not working but defined how to fix it - broken unit tests

* working - verified on VM. Unit tests not yet updated accordintly

* fixed all tests

* fixed formatting

* adjusted timezone during testing

* adjusted test for timezone
2017-04-27 22:57:04 -06:00
Kjell Hedström
121bb9c790 fix OSX/Clang build warnings and 32-bit linking errors regarding build versin (#176) 2017-04-24 21:50:35 -06:00
Kjell Hedström
ac54350346 The definitions file has to be generated after the options but before the build step. This way it will be included in the install target (#173) 2017-04-20 00:53:52 -06:00
Kjell Hedström
e04681ac42 Levels api changes 2 (#170)
* in progress

* Update loglevels.hpp

* Update loglevels.hpp

* don't code when too tired

* revert back

* removed comment
2017-04-05 23:03:55 -06:00
lemonnguyen
9f9062f45f Fix typos (#166) 2017-04-02 16:22:35 -06:00
Kjell Hedström
eba984171a Correcting define checks (#164)
* IF (NOT DEFINED  does NOT work on some CMake versions. This is a work-around

* removed log output
2017-04-01 10:39:34 -06:00
Kjell Hedström
33ed100f91 Colorer build and loglevel improvements (#161)
* static build with MS libs; remove vc11 support from cmake
* support AMD processor on winXp
* mingw build
* support older versions
* removed cmake warnings

* fix cmake >= 3.1 warnings (CMP0054)
* add target_include_directories - in projects that depend on g3log, do not need to specify include_directories
* Improved CPackage installation
* cleanup of build and test scripts
* c++14 gives for cleaner syntax
* build cleanup libg3logger.so will be a link to the actual libg3logger.so.<major><minor><build>. Only shared libraries from now on



* disableAll for log levels
* new setLogLevel impl
* cleaned up levels, now it should be easy for the user to understand how to add custom levels
2017-03-30 22:52:09 -06:00
Kjell Hedström
71ad664646 Update CPackLists.txt 2017-03-30 01:48:35 -06:00
Kjell Hedström
66a3d5ec0f Git release versioning (#163)
* corrected versions to fit release versioning

* fixed comments
2017-03-29 11:25:23 -06:00
Kjell Hedström
6e77118706 Time correction (#159)
* Improved the cpackage build. Also removed test compilation warnings

* To correcte what was reported in issue 155 (https://github.com/KjellKod/g3log/issues/155)
2017-03-28 11:09:10 -06:00
Kjell Hedström
417ae2ca10 Added a g3sink example (#158)
* Added a g3sink example

* Update API.markdown

* Update API.markdown

* Update API.markdown
2017-03-28 10:22:19 -06:00
Kjell Hedström
9b17525b97 Improved the cpackage build. Also removed test compilation warnings (#156) 2017-03-26 01:11:18 -06:00
Kjell Hedström
afa9a45a86 Update README.markdown 2017-03-24 13:49:24 -06:00
Aleksey Dobrunov
a48a4860fd fix mingw build (#152) 2017-02-19 10:50:58 -07:00
Kjell Hedström
3305652de5 Merge pull request #150 from 0017031/change_by_0017031
force /utf-8 for MSVC compiler
2017-02-15 00:02:56 -07:00
baic
411b8e249c force /utf-8 for MSVC compiler 2017-02-13 16:25:30 +08:00
Kjell Hedström
5660732d82 Merge pull request #147 from KjellKod/OSX_std_get_timespec
Update time.cpp
2017-01-08 14:07:02 -07:00
Kjell Hedström
c71349ac3d Update time.cpp 2017-01-08 14:01:38 -07:00
Kjell Hedström
a04b17abb5 Merge pull request #144 from rickyzhang82/pr-fix-output-format
Fix message newline issue
2016-12-23 09:13:19 -07:00
Ricky Zhang
d747de2840
Add back ugly tab
Signed-off-by: Ricky Zhang <rickyzhang@gmail.com>
2016-12-22 19:33:29 -05:00