Commit Graph

52 Commits

Author SHA1 Message Date
KjellKod
19b17b9d94 Cleanup of cmake structure 2014-10-03 00:56:13 -06:00
KjellKod
0931a611ed Some test_io FATAL unit tests were memory sensitive. Added robustness by making the fatal exit message static 2014-09-02 22:59:50 -06:00
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
fafa4cf96a Added handling for the the user might have buggy adding of sinks 2014-04-29 07:47:35 -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
03bece5bf8 Added another sink to get even more data flow through the test 2014-03-10 23:25:38 -06: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
kjell@kjell-win7.hsd1.co.comcast.net.
ebc8ae22b7 VS2013: removed warnings 2014-02-26 07:00:08 +01:00
KjellKod
59269ec351 Removed vs2013 warning. Previously the exception was ignored. 2014-02-24 00:29:50 -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
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
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
KjellKod
fe4862a96b Cleanup, added headers where they were missing. Removed default option ON for unit test. 2013-12-15 22:29:26 -07:00
KjellKod
507ec52c04 merging heads 2 of 2
--HG--
rename : g2log/src/g2sinkhandle.h => g2log/src/g2sinkhandle.hpp
2013-12-15 22:17:06 -07:00
KjellKod
97a6492d81 merging heads 1 of 2 2013-12-15 22:16:32 -07:00
KjellKod
d5ec3424e5 Renaming, moving from .h to .hpp. Should not affect API, mostly internal stuff
--HG--
rename : g2log/src/g2future.h => g2log/src/g2future.hpp
rename : g2log/src/g2sink.h => g2log/src/g2sink.hpp
rename : g2log/src/g2sinkhandle.h => g2log/src/g2sinkhandle.hpp
rename : g2log/src/g2sinkwrapper.h => g2log/src/g2sinkwrapper.hpp
rename : g2log/src/shared_queue.h => g2log/src/shared_queue.hpp
2013-12-15 22:13:43 -07:00
Aleksey Dobrunov
c2ba2546bb fix unit tests 2013-12-14 02:58:36 +06:00
KjellKod
f8c729ce1e dynamic logging levels are now possible. Use "#define G2_DYNAMIC_LOGGING" to get it. A slight performance penalty will result
but logging levels can then be turn on/off dynamically
2013-12-10 14:57:04 -07:00
kjell@kjell-win7.hsd1.co.comcast.net.
84f5dddc69 msbuild detected issues (ms only?) 2013-11-23 09:12:00 +01:00
KjellKod
c28593e87e Even faster. Using internal MoveOnCopy struct-wrapper. 2013-11-15 02:02:30 -07:00
KjellKod
889145453d Updated ... performance testing in purpose. 2x1million takes 18seconds to disk. average API calls 7us, average API call and bg disk write 9us
--HG--
rename : g2log/src/g2pretendtobecopyable.hpp => g2log/src/g2moveoncopy.hpp
2013-11-14 22:27:03 -07:00
KjellKod
2ba9d6187c All unit test working. Next step is to increase performance even more 2013-11-12 02:45:09 -07:00
KjellKod
61af55e335 (after 1 day of lost work)... recreating-work in progress. some unit test are still failing. Using unique_ptr for spee 2013-11-12 02:21:40 -07:00
KjellKod
11235acbc9 Removing g2logmessage pimpl 2013-11-11 23:07:34 -07:00
KjellKod
05dd7c9018 Performance testing. Left to tweak performance to get close to g2log original speed 2013-11-08 02:31:32 -07:00
KjellKod
ac2915da1f All unit tests are working after cleanup 2013-11-08 01:45:10 -07:00
KjellKod
ad322fd460 Updated. LOG(...) calls to uninizialized logger does not make it crash 2013-11-07 01:56:48 -07:00
KjellKod
99ea2e3f19 Updated unit test to deal with LogMessage. Using just string as default would trigger LogMessage::toString() 2013-11-04 22:15:44 -07:00
KjellKod
225c16313d All compile errors fixed. After refactoring/remodelling. Left is touching up the unit tests 2013-11-03 21:46:19 -07:00
KjellKod
81b6b91038 fixing compile errors after large conceptual remake 2013-11-02 10:01:18 -06:00
KjellKod
a59c837fd2 Dynamic sinks... all unit test working (although they should be consolidated). name-file manual merge from g2log-dev 2013-10-04 22:14:35 -06:00
KjellKod
e2af025563 All unit tests are passing. Seg fault was in unit test, not in code
Next: Cleanup namespace and creation
Next Next: Cleanup/Refactor message sending
2013-09-01 00:44:30 -06:00
KjellKod
e237f5a8fa narrowing down the errors§ 2013-08-30 00:01:07 -06:00
KjellKod
60af9ac1ca Added crashing unit test for next time debugging
--HG--
rename : g2log/test_unit/test_sink_concept.cpp => g2log/test_unit/test_concept_sink.cpp
2013-08-20 23:40:39 -06:00
KjellKod
d254879890 Generic cleanup and bugfix after massive merge... still ongoing
--HG--
rename : g2log/test_unit/test_sink.cpp => g2log/test_unit/test_sink_concept.cpp
2013-08-18 23:18:18 -06:00
KjellKod
17cf2ee910 Added simple test for sinks 2013-08-18 23:17:46 -06:00
KjellKod
bb778adf25 Cleanup 2013-08-18 23:17:04 -06:00
KjellKod
1aaa79fb3f compile errors fixed. multiple start/stop of logger fails 2013-08-01 23:06:12 -06:00
KjellKod
ab07e5978d Corrected the merging compile errors...
--HG--
rename : g2log/src/crashhandler.h => g2log/src/crashhandler.hpp
rename : g2log/src/g2logmessage.h => g2log/src/g2logmessage.hpp
rename : g2log/src/g2time.h => g2log/src/g2time.hpp
2013-07-29 22:43:33 -06:00
KjellKod
05018e389a commented out some unit test. corrected other's. rigth now I am pondering to
always keeping the file-handle known in the bglogger.
--- Alternatively there is no zink at startup except colored out maybe?
2013-07-23 22:01:12 -06:00
KjellKod
3c67023389 Internal for sinks added. Simple unit test added 2013-07-21 14:04:48 -06:00
KjellKod
301f2df05b made it compile by commenting away. let if fail! 2013-07-13 23:06:30 -06:00
KjellKod
6c3f58086d adding first failing test to test_sink 2013-07-13 22:59:02 -06:00
KjellKod
c015191b83 unit test refactoring. g2log, safe to do shutdownlogging multiple times 2013-07-13 19:33:00 -06:00
KjellKod
3e2f092924 adding unit test + make_unique 2013-07-13 17:57:26 -06:00
KjellKod
3fb37b0709 cmake refactoring , adding of unit tests 2013-07-13 17:56:38 -06:00
KjellKod
12dfc91458 Bugfix: Thanks to Alexander Ignatyev. Now handles illegal, empty directory names.
Bugfix: If directory path cannot be resolved it will as a last resort write the log to the current directory
2013-07-11 23:22:40 -06:00
KjellKod
a4c49a5549 Merged in changes from development repository.
* threadsafe use of localtime
* changing/retrieving log filename at runtime (using futures)
2012-10-14 01:54:56 +02:00
KjellKod
6d5f1f46ca Cosmetics: Corrected headers so that they look uniform. Added clarification in Readme about unpacking of gtest/glog for unit-test and performance tests 2011-11-21 17:04:02 -06:00