Simple
- Consists of two classes, one encapsulating a log and another encapsulating an object that wants to use the log
- Few but meaningful options, including indent, message type, contexts
- Not much to explain here, just wanted to leave as small of a footprint inside my code as possible.
- HTML output
- Alternating row background color
- Context markers
Here is the code:
AppLogger.h
AppLogger.cpp
Here is a screenshot showing some log output
The second piece of under-the-hood code is a generic object factory based on an article I read here at GameDev. I am using it to load objects from my level files and it seems pretty cool thus far.
I also got my hands dirty doing some XML parsing using TinyXml. This turned out to be pretty simple and I would recommend it to anyone wanting fast, basic XML capabilities in their C++ app.
I have also switched gears and plan to use Bullet Physics. Originally I was leaning towards PhysX and I cannot pin down exactly why I changed my mind, but it was just a feeling. Anyway, it will be my first time integrating any type of physics into a game so no mater what I will come away with some knowledge.
Gamewise I have began to hammer out a level file format and am now working on parsing the files and creating appropriate objects.
I eventually stopped using my log stuff altogether when I figured out I was never going back to the log file and that it was messing up my code with constant logging calls.