robvdl/MapEditor — Issue #2: Add logging support
Author: robvdl
Created: 2012-01-05 00:23:10+00:00
State: open

I want to convert all the cout messages to logger functions, so that they get put into a log file. The log file should be opened by main.cpp before we even fire up the main window, all other .cpp files must then easily be able to write to the logger output stream object so that the messages end up in one log file.

I have looked into some viable C++ logger libraries, and think both Pantheios and Boost Logging are two good options. They both have a modern C++ output stream way of writing to the log, which I like. Although Panteheios seems to be good as well, I have decided to stick to Boost mainly due to the fact it is easy to install from the Ubuntu repositories.

It would be nice, if the log file location is easy to change at the top of some .cpp file (maybe main.cpp), so it is each to change. Use the default location of /var/log/MapEditor.log for now.

You will likely need to learn how to link against the boost libraries from the MapEditor.pro file, so you may need to do some research on this.

Please also document which libraries need to be installed to compile the app with Boost Logging, preferably using the Ubuntu repository to get Boost, you can then add this information to the README file and/or to the Wiki.