Commit Graph

164 Commits

Author SHA1 Message Date
KjellKod
7fbdd34246 Added license and license referral to avoid any license confusion. G3log is a public domain dedication. Ref the unlicense.org 2014-07-03 15:42:19 -06:00
KjellKod
98ec05db7b Added threadID in case someone wants that. The std:🧵:id is looong. cutting it down would be nice,. but that is a job for the client 2014-05-25 01:38:03 -06:00
KjellKod
9be8f49f66 VTune performance .... from 4us on average (dual threads performance test) to 3us avarage 2014-05-25 01:09:50 -06:00
KjellKod
fafa4cf96a Added handling for the the user might have buggy adding of sinks 2014-04-29 07:47:35 -06:00
KjellKod
f0c3a43c3a spell check 2014-04-29 00:10:58 -06:00
KjellKod
c00981fad0 Bugfixes and improvments. Thanks to Csaba with team.
Bugfixes:   Initialization/Destruction order was wrong. This would cause a shutdown race condition.
Improvements:  Skipped pimpl (no hiding necessary), pointer comparison in g2log.cpp,  clarified shutdown safety with comment in ~LogWorker
Unit tests:  Added agressive shutdown test in test_sinks.cpp
2014-04-28 23:46:42 -06:00
KjellKod
e54706d77b std::formard of args in sink 2014-04-12 00:45:19 -06:00
KjellKod
33d6378e01 std::forward arguments. Actually this helped in reducing worst case performance 2014-04-12 00:18:30 -06:00
KjellKod
183a513fd0 Cleanup to help for APPLE use, both Clang and GCC 2014-03-10 23:26:05 -06:00
KjellKod
03bece5bf8 Added another sink to get even more data flow through the test 2014-03-10 23:25:38 -06:00
KjellKod
33106756ec Corrected include 2014-03-09 00:47:09 -07:00
KjellKod
f5438d8232 Thanks to Rajesh to push for g3log support for "runtime loading of dynamic libraries" (that will use g3log, initiated in main)
Thanks to Dmitry (d-led) for this working proof-of-concept of this at: https://github.com/d-led/g2log-dll

--HG--
rename : g2log/src/g2LogMessageBuilder.cpp => g2log/src/g2logmessagecapture.cpp
rename : g2log/src/g2LogMessageBuilder.hpp => g2log/src/g2logmessagecapture.hpp
2014-03-08 23:33:49 -07:00
KjellKod
0bfd6cb97b Readme. fixup 2014-02-25 23:18:18 -07:00
KjellKod
9fa3acf2cb Readme. Build instructions 2014-02-25 23:16:59 -07:00
KjellKod
77653a1d3b Updated REAME. Tested with Clang 2014-02-25 23:14:50 -07:00
kjell@kjell-win7.hsd1.co.comcast.net.
ebc8ae22b7 VS2013: removed warnings 2014-02-26 07:00:08 +01:00
KjellKod
8220839771 Clang/Gcc bugfix:
Fixed g2logworker destructor race condition. Sinks and background thread were not cleared in the right order.
Now the order is enforced.

This means that g3log should work fine with Clang. CMakeLists.txt is updated to reflect the Clang support
2014-02-25 22:05:48 -07:00
KjellKod
a5765af28d Added gtest 1.7,. but will keep gtest 1.6 for now as well in case of issues with older compilers 2014-02-25 22:03:45 -07:00
KjellKod
59269ec351 Removed vs2013 warning. Previously the exception was ignored. 2014-02-24 00:29:50 -07:00
KjellKod
40a6e99bc0 Work around for bug in VS2013. Reported here: http://www.beta.microsoft.com/VisualStudio/feedback/details/757472/c-concurrency-task-and-std-bind
"auto" did not cut it apparently.
2014-02-24 00:23:43 -07:00
KjellKod
956da51317 Thanks to Aleksey Dobrunov who noticed this compile error. Weird that it did not show up in gcc 2014-02-24 00:21:57 -07:00
KjellKod
1ed4bcb38c Bugfix: sinkhandle can now be used to call, asynchronously, functions with more return types than std::string 2014-02-11 20:00:20 -07:00
KjellKod
ffb4d86c1e Improvement: Shutdownlogging is now called AUTOMATICALLY at LogWorker scope exit/destruction. If for some reason (mistake or unit testing) multiple LogWorkers are created then
only the one that is g2::initialized(...) can cause a shutDownLogging when it is destructed.
2014-02-02 23:49:24 -07:00
KjellKod
02543e817a VS2013 must be used, 2014-01-28 09:19:58 -07:00
KjellKod
0c1845ee18 Avoid premature wakeup from reader thread by doing the notify AFTER the mutex is released
http://www.justsoftwaresolutions.co.uk/threading/implementing-a-thread-safe-queue-using-condition-variables.html
2014-01-24 13:17:10 -07:00
KjellKod
63616d2acd performance increase by using internal unique_ptr for the sink instead of shared_pointer.
Better average (10-15%), and much, much, much better worst case
2014-01-19 22:55:44 -07:00
kjell@kjell-win7.hsd1.co.comcast.net.
d0045de73b spell check 2014-01-17 09:06:11 +01:00
kjell@kjell-win7.hsd1.co.comcast.net.
460f16d5f4 text 2014-01-17 09:01:28 +01:00
kjell@kjell-win7.hsd1.co.comcast.net.
82095de062 code examples 2014-01-17 08:47:01 +01:00
kjell@kjell-win7.hsd1.co.comcast.net.
f3388a66df ... 2014-01-17 08:46:15 +01:00
kjell@kjell-win7.hsd1.co.comcast.net.
e558d3baed code example of handle 2014-01-17 08:45:12 +01:00
kjell@kjell-win7.hsd1.co.comcast.net.
c772785e2a Explanation of how to call a sink through handler 2014-01-17 08:44:00 +01:00
kjell@kjell-win7.hsd1.co.comcast.net.
9be95044ef formatting 2014-01-17 08:26:38 +01:00
kjell@kjell-win7.hsd1.co.comcast.net.
ba6d1856a5 formatting 2014-01-17 08:25:38 +01:00
kjell@kjell-win7.hsd1.co.comcast.net.
f5c89d67b6 explanation of sinks 2014-01-17 08:24:35 +01:00
kjell@kjell-win7.hsd1.co.comcast.net.
3abf46b336 formatting 2014-01-17 08:20:14 +01:00
kjell@kjell-win7.hsd1.co.comcast.net.
c995f4e8a6 markup bugfix 2014-01-17 08:17:18 +01:00
kjell@kjell-win7.hsd1.co.comcast.net.
82cc712fca fDraft of finished readme now that the sinks examples are in 2014-01-17 08:15:40 +01:00
kjell@kjell-win7.hsd1.co.comcast.net.
3b34da51db Added code example on how to use sinks 2014-01-17 08:04:51 +01:00
kjell@kjell-win7.hsd1.co.comcast.net.
342c8aefff fixing up. introduction 2014-01-17 07:34:53 +01:00
kjell@kjell-win7.hsd1.co.comcast.net.
cc554ff2cc comment fix 2014-01-14 07:18:38 +01:00
kjell@kjell-win7.hsd1.co.comcast.net.
9df4fbd99c constexpr and static_assert when NOT on MSVC. #ifdef workaround for MSVC 2014-01-14 07:10:26 +01:00
kjell@kjell-win7.hsd1.co.comcast.net.
9f015b4216 Performance fix: g2time return string without unnecessary (old) stream buffering 2014-01-14 07:07:00 +01:00
KjellKod
1ac2e9070e Thanks to Aleksey Dobrunov: Improvement by making all raw data in the g2logmessage public
Added explaining comments to g2logmessage
2014-01-10 09:18:27 -07:00
KjellKod
cb7c0f8ac5 less junk in status check 2014-01-08 22:59:28 -07:00
KjellKod
5486bbceca Dynamic logging levels can be enabled with a define. All levels are by default ON 2014-01-08 22:48:18 -07:00
Aleksey Dobrunov
beff32d718 mingw build 2013-12-30 13:44:32 +06:00
KjellKod
916f478267 Updated performance test in case all "buckets" hits would be in the 0ms bucket then it is shown in us instead 2013-12-28 14:58:22 -07:00
kjell@kjell-win7.hsd1.co.comcast.net.
e850c33354 pragma remove 2013-12-28 20:52:46 +01:00
kjell@kjell-win7.hsd1.co.comcast.net.
c2b328bfe8 comment and pragma cleanup 2013-12-28 20:46:56 +01:00