introducing new logger

This commit is contained in:
Erik Frojdh
2020-03-11 10:54:55 +01:00
parent 2acf64b09c
commit 4aeb8bf62e
5 changed files with 34 additions and 34 deletions

View File

@ -188,3 +188,5 @@ inline void Output2FILE::Output(const std::string& msg, TLogLevel level)
}
fflush(out ? stdout : pStream);
}
#include "logger2.h"

View File

@ -2,7 +2,7 @@
/*Utility to log to console*/
#include "ansi.h" //Colors
#include "logger.h" //for enum, to be removed
// #include "logger.h" //for enum, to be removed
#include <iostream>
#include <sstream>
@ -56,7 +56,7 @@ class Logger {
constexpr size_t buffer_len = 12;
char buffer[buffer_len];
time_t t;
time(&t);
::time(&t);
tm r;
strftime(buffer, buffer_len, "%X", localtime_r(&t, &r));
buffer[buffer_len - 1] = '\0';

View File

@ -1,7 +1,5 @@
#include "catch.hpp"
#include "logger.h"
#include "logger2.h"
#include <iostream>
#include <fstream>
#include <chrono>