Logging library for (c++) games
Posted
by
Klaim
on Game Development
See other posts from Game Development
or by Klaim
Published on 2011-02-17T10:21:14Z
Indexed on
2011/11/24
2:22 UTC
Read the original article
Hit count: 463
I know a lot of logging libraries but didn't test a lot of them. (GoogleLog, Pantheios, the coming boost::log library...)
In games, especially in remote multiplayer and multithreaded games, logging is vital to debugging, even if you remove all logs in the end.
Let's say I'm making a PC game (not console) that needs logs (multiplayer and multithreaded and/or multiprocess) and I have good reasons for looking for a library for logging (like, I don't have time or I'm not confident in my ability to write one correctly for my case).
Assuming that I need :
- performance
- ease of use (allow streaming or formating or something like that)
- reliable (don't leak or crash!)
- cross-platform (at least Windows, MacOSX, Linux/Ubuntu)
Wich logging library would you recommand?
Currently, I think that boost::log is the most flexible one (you can even log to remotely!), but have not good performance update: is for high performance, but isn't released yet. Pantheios is often cited but I don't have comparison points on performance and usage. I've used my own lib for a long time but I know it don't manage multithreading so it's a big problem, even if it's fast enough. Google Log seems interesting, I just need to test it but if you already have compared those libs and more, your advice might be of good use.
Games are often performance demanding while complex to debug so it would be good to know logging libraries that, in our specific case, have clear advantages.
© Game Development or respective owner