dont reset coloring when it wasn't set in the first place, partially fixes Windows woes. See #979

This commit is contained in:
Dennis Luxen 2014-04-07 15:11:04 -04:00
parent 783e8edf71
commit b8f882dba4

View File

@ -36,7 +36,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <iostream> #include <iostream>
enum LogLevel { logINFO, logWARNING, logDEBUG }; enum LogLevel { logINFO, logWARNING, logDEBUG };
static boost::mutex logger_mutex; static boost::mutex logger_mutex;
const char COL_RESET[] = "\x1b[0m"; const char COL_RESET[] = "\x1b[0m";
const char RED[] = "\x1b[31m"; const char RED[] = "\x1b[31m";
const char GREEN[] = "\x1b[32m"; const char GREEN[] = "\x1b[32m";
@ -79,7 +79,7 @@ public:
boost::mutex::scoped_lock lock(logger_mutex); boost::mutex::scoped_lock lock(logger_mutex);
level = l; level = l;
os << "["; os << "[";
switch(level) { switch(level) {
case logINFO: case logINFO:
os << "info"; os << "info";
break; break;