🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Quill - Low Latency Logging Library

Started by
2 comments, last by odygrd 3 years, 10 months ago

Last few months I am working on a low latency logging library (https://github.com/odygrd/quill). The library is used mainly for trading applications. I thought it might also be useful to the gaming community. Any feedback is welcome.

Advertisement

Looks interesting.

The non-prefixed macros are bad. I know that there's an option to turn them off, but that should really be the default. Consider using QUILL_WARNING instead of the longer QUILL_LOG_WARNING or the namespace-polluting LOG_WARNING.

One thing that bothers me about the asynchronous approach is that when the program crashes, it can crash before the last few log messages are output, and the last few log messages before a crash are usually the most interesting log messages to look at.

a light breeze said:

One thing that bothers me about the asynchronous approach is that when the program crashes, it can crash before the last few log messages are output, and the last few log messages before a crash are usually the most interesting log messages to look at.

To handle this you need a signal handler in your application that will just call ’quill::flush()’ when application crashes and this will log everything..

The reason that there isn’t a signal handler in the library yet, is because it is kind of an application specific thing. For example the application should decide which signals to handle and how not the logging library. Also if two threads or more threads crash at the same time also this needs to be handled in the signal hander..

I am planning to add one in the future, in case the user doesn’t want it’s own.. I have a signal handler but I had some issues making it cross platform, because there is no ‘alarm()’ on windows.

This topic is closed to new replies.

Advertisement