1
Programming / Re: Logging support (for bug reports and stuff)
« on: December 10, 2011, 11:03:33 am »
Well, if you want to test out Logog library for logging purposes, here is simple patch which just includes Logging.h and simple init for main.cpp. Only tested for MSVC++.
Get and compile Logog library from:
https://johnwbyrd.github.com/logog/
- put Logog include files into openxcom\deps\include\logog
- put logog.lib into openxcom\deps\lib
Patch doesnt screw up your project files, so you have to do it yourself :-)
- add ..deps\include\logog into your project include
- add logog.lib to your project linker input depencies
- add Logging.h to your project files
- also remember to add #include "Engine\Logging.h" to any file you want to use logging (well, I add it to one central .h file which gets included in every file...)
And then just go test...
INFO("This won't work, no way.");
DBUG_GROUP("AI","Alien AI is going to get you");
DBUG_GROUP("VIDEO","Another video failure, bah!");
...
And when you start loving the fine Log Files you have and all the information you get from them, you can code your own implementation of Logging class, so you dont have to use library. Might do that myself lateron, but not until after Christmas or something, if ever.
Get and compile Logog library from:
https://johnwbyrd.github.com/logog/
- put Logog include files into openxcom\deps\include\logog
- put logog.lib into openxcom\deps\lib
Patch doesnt screw up your project files, so you have to do it yourself :-)
- add ..deps\include\logog into your project include
- add logog.lib to your project linker input depencies
- add Logging.h to your project files
- also remember to add #include "Engine\Logging.h" to any file you want to use logging (well, I add it to one central .h file which gets included in every file...)
And then just go test...
INFO("This won't work, no way.");
DBUG_GROUP("AI","Alien AI is going to get you");
DBUG_GROUP("VIDEO","Another video failure, bah!");
...
And when you start loving the fine Log Files you have and all the information you get from them, you can code your own implementation of Logging class, so you dont have to use library. Might do that myself lateron, but not until after Christmas or something, if ever.