-
High Performance C++11 Logger(async processing)
I know this project seems kind of ridiculous(as in a waste of time), but I thought it's coming out pretty nicely. Basically the idea is that disk IO when logging should be done in a separate background worker thread to minimize possible latency when writing logs.
This project is a revamp of the open source project, g2log. The main improvements are the improved maintainability using polymorphic classes and use of Intel's concurrency_queue template for log requests, which significantly reduces cpu time when experiencing a large number of requests.
Inspiration and base:
g2log: An efficient asynchronous logger using C++11 - CodeProject
The version I'm working on isn't close to being finished, but I'm looking for some feedback on my code and how I could improve it.
Here's a copy of it in an open source project I just started.
https://sourceforge.net/p/moo-guard/...Base/Core/Log/
Some issues I've noticed and haven't fixed yet:
- Three indents from the namespaces are a bit annoying, might be best to use a macro for the company name.
- The headers are too dependent, I'm thinking of forwarding some class declarations to reduce inclusions.
- Needs a lot more testing(unit tests etc).
- More config options would be ideal.
Remember, this is a practice project. If you want a similar logger for use, g2log is certainly a better option at this point. My main goals for the project are to make an extensible and useful logging library for a gaming or other performance intensive application.
-