Kjell Hedstrom
a1a3672d71
Missing include
2015-09-11 03:23:24 -06:00
Kjell Hedstrom
602e135f84
Added resotre and override signal handler
2015-09-10 06:20:26 -06:00
Kjell Hedstrom
3bcf360815
vanilla example. dynamic signal turning on/off
2015-09-01 00:35:47 -06:00
Kjell Hedstrom
a8d89b67c8
Merge branch 'clang-improved-crash-handling' of https://github.com/KjellKod/g3log into clang-improved-crash-handling
...
Conflicts:
Build.cmake
example/main_fatal_choice.cpp
2015-08-31 23:07:25 -06:00
Kjell Hedstrom
a068575595
removed comments. improved death test
2015-08-31 22:30:48 -06:00
Kjell Hedstrom
671fd01aa1
This is made to NOT compile ... lines that don't compile are sections I need to check out
...
exhausted stack. kill vs exit. using libunwind or backtrace but with symoblizer should be tested
and blogged about(?)
2015-08-27 08:02:18 -06:00
Kjell Hedstrom
3efcef3505
my own code review I
2015-08-19 10:19:55 -06:00
Kjell Hedstrom
1803498e89
Breaking change but a good change: Cleared up the API for Creating log worker and Adding sinks
2015-08-19 10:08:41 -06:00
Kjell Hedstrom
14a46f4567
Swap is less affective
2015-08-12 07:39:09 -06:00
Kjell Hedstrom
c6a0c28435
removed iostream previously used for temporary visibility
2015-08-12 06:48:55 -06:00
Kjell Hedstrom
8dfe9e0716
Improved copy constructors and assignment operator which is needed now when LOGLEVELS can be made on the fly
2015-08-12 06:43:24 -06:00
Kjell Hedstrom
13cc398f06
comparison operators for level: gtest, std::find, == operator, !=operator
2015-08-04 07:43:38 -06:00
Kjell Hedstrom
d09ca7787d
use the genereated_definitions.hpp
2015-07-22 13:28:10 -06:00
Kjell Hedstrom
540e9601df
handling the case of DEBUG to DBUG
2015-07-20 08:23:49 -06:00
Kjell Hedstrom
d5ad2709a7
removed changes to g3::only_change_at_initialization at shutdown/init.
...
It is thread unsafe and should be done explicitly (also the threaded 100 threads calling with initialzation + shutdown was handing)... good test
2015-07-20 08:11:57 -06:00
Kjell Hedstrom
786b92a6d1
Another, tiny, breaking change.
...
Due to popular request I have added the possibility to put in your own custom log levels. Due to performance regards changes to the log levels should ONLY be done
in a single thread context (initialiation) for that reason the namespace
used to "setLogLevel" is named appropriately
i.e. use: g3::only_change_at_initialization::setLogLevel(...)
2015-07-20 08:00:33 -06:00
Kjell Hedstrom
c4f9463b6b
Custom levels can be added: So far dynamic on-off does not work
2015-07-20 00:45:41 -06:00
Kjell Hedstrom
7c7012325d
Easier to install. continues
...
1) Breaking change: g3 namespace replaces g2
2) g2log.hpp remains in src/g2log.hpp... but now all it does is to include the g3log.hpp, etc
3) ALL HEADER FILES ARE IN src/g3log/ while all .cpp and .ipp files are in /src (exception for g2log.hpp)
This should make it EASIER for clients to copy/install the header files to the new location. It greatly simplifies
rpm and cpackage installationsw
2015-07-19 23:10:56 -06:00
Kjell Hedstrom
6750efe8fe
g2log.hpp is kept as a helper include. It will pull in the most frequent include files
...
All other are under g3log. Example: #include <g3log/time.hpp> #include <g3log/g3log.hpp> etc
This makes sure that the package manager (to be used soon) does NOT clutter any /usr/local/include space
instead all the includes will be in /usr/local/include/g3log (or similar)
2015-07-16 01:55:23 -06:00
Kjell Hedstrom
ebcfe9ff06
remove windows warnings. Thanks to @ctapmex
2015-06-24 14:50:46 -06:00
Kjell Hedstrom
176fca55a6
Thanks to @Bob Flynn:
...
Separated the microseconds counter with a space instead of a period.
Also added explanation that the counter is from the initialization
2015-06-24 14:32:31 -06:00
KjellKod
37989ed52f
merging headswq
2015-05-03 22:41:20 -06:00
Kostya Bazhanov
43652ef7c9
Fix -Wextra-semi Clang warning.
...
--HG--
branch : pr4
2015-04-29 12:24:11 +03:00
Kostya Bazhanov
4686fb9cc2
Remove trailing spaces.
...
--HG--
branch : pr4
2015-04-29 12:23:30 +03:00
Kostya Bazhanov
8e4929cbdb
Fix -Wunused-function Clang warning.
...
--HG--
branch : pr4
2015-04-29 12:22:26 +03:00
Kostya Bazhanov
cb097cbd3e
Remove trailing spaces.
...
--HG--
branch : pr4
2015-04-29 12:21:45 +03:00
David Gayerie
4c45244391
fixing cross compilation on Linux for MINGW gcc 4.8.2
2015-03-29 14:29:07 +02:00
Kjell Hedstrom
7c5254c80b
thread_local issues on Linux, using atomic instead
2015-03-02 02:02:43 -07:00
Kjell Hedstrom
58ffeac9bc
Clarified issue with __debugbreak()
2015-03-02 01:17:52 -07:00
Kjell Hedstrom
a5d922de49
__debugbreak in windows can easily cause recursive crashes if you are
...
NOT in debug mode in your visual IDE
2015-03-02 01:14:03 -07:00
Kjell Hedstrom
cc5cf169ba
After code review by Kamil.
...
Moved internal API to public API.
g2log.hpp/cpp g2::setFatalPreLoggingHook(...) and g2::setFatalExitHandler(...)
2015-02-23 23:29:02 -07:00
Kjell Hedstrom
a69eb201a1
Pre-fatal-log hook for usage before the fata log is sent to sinks
2015-02-22 23:31:17 -07:00
Kjell Hedstrom
fc1acd742d
1) windows exception will now trigger break point in VS
...
2) Fatal signal will in DEBUG trigger a break point in VS
- It can be disabled by a #define
3) signal handler can be disabled by a #define
2015-02-18 03:55:16 -07:00
Kjell Hedstrom
eab596cfac
Added exception handling comment
2015-02-16 02:31:16 -07:00
Kjell Hedstrom
81885e4456
Enabled vectored exception crash handling, it can also be turned off easily with a define
...
cmake -DENABLE_VECTORED_EXCEPTIONHANDLING=OFF
2015-02-16 01:37:55 -07:00
Kjell Hedstrom
4c7c5c7ca7
Disabled Vectored exception handling: TEMPORARILY.
...
It will likely be enabled shortly but with
1) options for enabling/disabling it
2) use of unit test for unknown exceptions (and known)
to make sure that 3rd party libraries that use exceptions (sigh)
way too frequently are not affected.
3) only handling "known exceptions" unknown exceptions will get perhaps a
LOG(WARNING) but no more "exiting"
2015-02-03 22:53:01 -07:00
Kjell Hedstrom
b3e7032678
Signals seems to have to be installed for EVERY thread
2015-02-02 21:35:48 -07:00
KjellKod
938fc55971
What a mess to merge from Github/KjellKod/g3log to BitBucket/KjellKod/g3log
2015-02-02 00:31:43 -07:00
kjellkod@kjellkod-Asus.hsd1.co.comcast.net.
c23a8e2419
Remove warning in Windows by using vsnprintf_s
2014-12-11 00:10:47 -07:00
KjellKod
87a095e384
Renamed directories for a cleaner project structure
...
--HG--
rename : g2log/Build.cmake => Build.cmake
rename : g2log/CMakeLists.txt => CMakeLists.txt
rename : g2log/CPackLists.txt => CPackLists.txt
rename : g2log/Dynamic.cmake => Dynamic.cmake
rename : g2log/example/Example.cmake => example/Example.cmake
rename : g2log/example/main_contract.cpp => example/main_contract.cpp
rename : g2log/example/main_sigsegv.cpp => example/main_sigsegv.cpp
rename : g2log/src/active.hpp => src/active.hpp
rename : g2log/src/crashhandler.hpp => src/crashhandler.hpp
rename : g2log/src/crashhandler_unix.cpp => src/crashhandler_unix.cpp
rename : g2log/src/crashhandler_win.cpp => src/crashhandler_win.cpp
rename : g2log/src/g2filesink.cpp => src/g2filesink.cpp
rename : g2log/src/g2filesink.hpp => src/g2filesink.hpp
rename : g2log/src/g2filesinkhelper.ipp => src/g2filesinkhelper.ipp
rename : g2log/src/g2future.hpp => src/g2future.hpp
rename : g2log/src/g2log.cpp => src/g2log.cpp
rename : g2log/src/g2log.hpp => src/g2log.hpp
rename : g2log/src/g2loglevels.cpp => src/g2loglevels.cpp
rename : g2log/src/g2loglevels.hpp => src/g2loglevels.hpp
rename : g2log/src/g2logmessage.cpp => src/g2logmessage.cpp
rename : g2log/src/g2logmessage.hpp => src/g2logmessage.hpp
rename : g2log/src/g2logmessagecapture.cpp => src/g2logmessagecapture.cpp
rename : g2log/src/g2logmessagecapture.hpp => src/g2logmessagecapture.hpp
rename : g2log/src/g2logworker.cpp => src/g2logworker.cpp
rename : g2log/src/g2logworker.hpp => src/g2logworker.hpp
rename : g2log/src/g2moveoncopy.hpp => src/g2moveoncopy.hpp
rename : g2log/src/g2sink.hpp => src/g2sink.hpp
rename : g2log/src/g2sinkhandle.hpp => src/g2sinkhandle.hpp
rename : g2log/src/g2sinkwrapper.hpp => src/g2sinkwrapper.hpp
rename : g2log/src/g2time.cpp => src/g2time.cpp
rename : g2log/src/g2time.hpp => src/g2time.hpp
rename : g2log/src/shared_queue.hpp => src/shared_queue.hpp
rename : g2log/src/std2_make_unique.hpp => src/std2_make_unique.hpp
rename : g2log/src/stlpatch_future.hpp => src/stlpatch_future.hpp
rename : g2log/test_performance/Performance.cmake => test_performance/Performance.cmake
rename : g2log/test_performance/main_threaded_mean.cpp => test_performance/main_threaded_mean.cpp
rename : g2log/test_performance/main_threaded_worst.cpp => test_performance/main_threaded_worst.cpp
rename : g2log/test_performance/performance.h => test_performance/performance.h
rename : g2log/test_unit/Test.cmake => test_unit/Test.cmake
rename : g2log/test_unit/test_concept_sink.cpp => test_unit/test_concept_sink.cpp
rename : g2log/test_unit/test_configuration.cpp => test_unit/test_configuration.cpp
rename : g2log/test_unit/test_filechange.cpp => test_unit/test_filechange.cpp
rename : g2log/test_unit/test_io.cpp => test_unit/test_io.cpp
rename : g2log/test_unit/test_linux_dynamic_loaded_sharedlib.cpp => test_unit/test_linux_dynamic_loaded_sharedlib.cpp
rename : g2log/test_unit/test_sink.cpp => test_unit/test_sink.cpp
rename : g2log/test_unit/tester_sharedlib.cpp => test_unit/tester_sharedlib.cpp
rename : g2log/test_unit/tester_sharedlib.h => test_unit/tester_sharedlib.h
rename : g2log/test_unit/testing_helpers.cpp => test_unit/testing_helpers.cpp
rename : g2log/test_unit/testing_helpers.h => test_unit/testing_helpers.h
2014-10-03 01:20:33 -06:00