100 Commits

Author SHA1 Message Date
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 b30513450d02d0bcb032e9b3997cf3592f87597e.

* 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
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
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
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
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
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
Ricky Zhang
fc615b4ac0
Fix message newline issue
Signed-off-by: Ricky Zhang <rickyzhang@gmail.com>
2016-12-22 11:23:25 -05:00
Andreas Schönle
2ebb9c2346 Merge branch 'master' into windows-time-fix 2016-12-19 17:03:23 +01:00
Kjell Hedström
34aa4ff8d6 Update time.cpp
removed ifdef's and using Andreas' implementation of  get_time
2016-12-09 23:26:20 -07:00
Kjell Hedström
6bf8afddfa Merge pull request #133 from AbberiorInstruments/arm-fix
compiles on arm
2016-12-09 23:02:21 -07:00
Kjell Hedström
b7adc0e77d fix formatting to get the branch merged 2016-12-09 23:02:04 -07:00
Andreas Schönle
03734dd29c alternative, better fix as proposed by Kjell 2016-12-06 17:36:17 +01:00
Andreas Schönle
8d01c2224d reverted file parameter to std::string reference, adjusted formatting 2016-12-06 17:13:27 +01:00
Andreas Schönle
f018f3e92f Fixed formatting 2016-12-06 14:34:23 +01:00
Andreas Schönle
793ddbd42e changed to copying the file path upon message creation 2016-12-06 14:07:01 +01:00
SchoenleAndi
b1088d06ab Merge branch 'master' into include-file-path-only 2016-12-04 19:17:39 +01:00
SchoenleAndi
069085c451 fix timing inaccuracy on windows 2016-12-04 16:09:23 +01:00
SchoenleAndi
e93031c6d0 compiles on arm 2016-12-02 17:01:16 +01:00
SchoenleAndi
1dafdaf2a4 msfc fromat specifiers added 2016-10-19 13:41:48 +02:00
SchoenleAndi
c467851423 save include fil full path as const char * in LogMessage 2016-10-19 13:21:52 +02:00
Kjell Hedström
ba81287ca5 bugfix time formatting (#119)
* bugfix time formatting

* fixit
2016-08-30 18:34:13 -06:00
Lynn
1bae2e6a68 Typo fix (Vaulue → Value) (#120)
* typo fix (Vaulue → Value)

* typo fix (Vaulue → Value)
2016-08-30 11:10:58 -06:00
Kjell Hedstrom
e0fb4fd24e fixit 2016-08-25 00:51:21 -06:00
Kjell Hedstrom
26f76cd103 bugfix time formatting 2016-08-25 00:49:17 -06:00
Kjell Hedström
9b8e13bcfe Update crashhandler.hpp (#110)
Thanks to @graugans
2016-08-11 07:08:41 -06:00
Kjell Hedström
86473c60e0 Gimesketvirtadien's time requested changes (#104)
* Added "removeSink" method and related functionality to LogWorker API

* Added a new API for plugging in custom Timestamp generator.

* Revert "Added "removeSink" method and related functionality to LogWorker API"

This reverts commit c9cee5d9a077ce1e7e68f07cc30d03e4bed19c7b.

* Dropping shared_ptr<Timestamp> in log messages and using regular vars

* Moving to standard timespec struct from custom Timestamp

* Wiring timespec timestamps with formating routine

* Falling back to clock_gettime

* Reverting g3 API changes

* Optimizing format string generation

* Removed _microseconds from LogMessage

* Implemented sec fractional format key

* Optimization of format string generation

* Adjusting comments

* Refining localtime_formatted by introducing two helper functions

* refactored and simplified code

* fixed up some commented away unit tests

* refactoring message specifics tests to it's own test

* Use gcc 4.9

* C++14 for Linux

* Update .travis.yml

* Update buildAndRunTests.sh

* lower case in `-std=c++14`

* -lrt flag for gcc

* Added support for high precision clock on Linux/gcc (already there now for OSX). Windows is still missing

* intermediate comments

* Clarified for some code readers the mysterious use of assert in an expression that is always true

* refactored + renamed functions and constants. Added unit test for retrieving fractional type

* committing changes previously fixed - finished unit testing for g3::internal::time::GetFractional(..)

* added unit test for fractional to string

* added missing unit tests for localtime_formatted

* fixed? nano / microsec functionality to timer

* test
2016-08-11 00:27:52 -06:00
jkhoogland
ff722164d4 Warning braces loglevels clang 3.7 (#108)
* Fix gcc compiler warning for braces around scalar

* use 'toString' to get the formatted output in the fatal cerr message when a LOG fatal or CONTRACT happens. This was already OK on the sink side

* Avoid initialization/shutdown deadlock that could occur due to wrong use of the API

* Workaround for windows testing (#100)

* added automatic linking pragma for `StackWalk64` (#96)

* fix to implicit type casting (#98)

* create a Xcode project

* fixed to implicit type casting

* Revert "create a Xcode project"

This reverts commit e3216391f536fa41c47067fdb0296c56bafa11fa.

* Fixed a bug causing cross-compilers to fail (#101)

(The edited line eliminated the original CXXFLAGS variable, removing the sysroots parameter, which is needed for cross compiling)

* Update logworker.cpp (#103)

* Fix gcc compiler warning for braces around scalar

* Add back braces
2016-07-31 17:01:54 -06:00
Kjell Hedström
e0d4434428 Update logworker.cpp (#103) 2016-06-23 21:35:59 -06:00
Dmitry Ledentsov
f10fbe1d9c added automatic linking pragma for StackWalk64 (#96) 2016-06-12 16:57:55 -06:00
JiHyung Lee
736d6437b8 fix to implicit type casting (#98)
* create a Xcode project

* fixed to implicit type casting

* Revert "create a Xcode project"

This reverts commit e3216391f536fa41c47067fdb0296c56bafa11fa.
2016-06-12 14:09:55 -06:00
Kjell Hedstrom
70b37d66a0 Avoid initialization/shutdown deadlock that could occur due to wrong use of the API 2016-05-23 22:25:32 -06:00
Kjell Hedstrom
bfe1e8ad19 use 'toString' to get the formatted output in the fatal cerr message when a LOG fatal or CONTRACT happens. This was already OK on the sink side 2016-03-30 16:35:38 -06:00
Kjell Hedström
4472ba3cbf fix the tool, not the code 2016-03-24 10:43:09 -06:00
Kjell Hedström
d01dfbf992 revert "fix" for issue with checkmarx. The tool should be fixed, not the code 2016-03-24 10:41:23 -06:00
Kjell Hedstrom
8df4eadd92 removed false positives as detected by Checkmarx code analysis tool. Not impressed so far though with the tool 2016-03-18 10:50:59 -06:00
Kjell Hedström
5790c3723f Merge pull request #80 from KjellKod/Thread_local
Update stacktrace_windows.cpp
2016-02-24 19:16:09 -07:00
Kjell Hedsröm
b7704b1ed7 fixed merge conflict 2016-02-17 00:06:45 -07:00
Kjell Hedsröm
1ebaf0e7e5 fixed conflict 2016-02-16 23:16:22 -07:00
Kjell Hedsröm
a0b961ee04 Allow parenthesis in path and filename 2016-02-16 22:52:38 -07:00
Kjell Hedström
279587c567 Update stacktrace_windows.cpp
For access to thread_local definition
2016-02-16 20:55:28 -07:00
Jiri Hoogland
e981b08c81 Put include headers back per request of Kjell 2016-02-03 18:19:36 -05:00
Jiri Hoogland
b8f28d3a49 Fix missing include files 2016-02-02 19:05:29 -05:00
Jiri Hoogland
31c01b168c Add ability for user to override 'g3log' monniker in log file 2016-01-28 10:02:22 -05:00
Aleksey Dobrunov
69e0cafee8 fix unit test 2016-01-27 13:56:14 -05:00
Aleksey Dobrunov
0384eb1638 fix build lib 2016-01-27 13:56:14 -05:00
Aleksey Dobrunov
c9e93c8d14 remove unused include 2016-01-27 13:56:14 -05:00
Aleksey Dobrunov
444642f47b fix unit test 2016-01-11 23:48:56 +05:00