Removed obsolete commands

This commit is contained in:
WolverinDEV 2020-03-01 15:42:59 +01:00
parent fd8aba2ede
commit 84016ae461
2 changed files with 5 additions and 6 deletions

View File

@ -1,10 +1,9 @@
#include "LogUtils.h"
#include "LogSinks.h"
#include <fstream>
#include <spdlog/formatter.h>
#include <ctime>
#include <array>
#include <spdlog/details/os.h>
#include <spdlog/formatter.h>
using namespace std;
using namespace spdlog;
@ -47,10 +46,10 @@ namespace logger {
std::time_t time = log_clock::to_time_t(point);
std::tm timetm = *std::localtime(&time);
static constexpr auto max_length = 9;
static constexpr auto max_length = 20;
dest.reserve(dest.size() + max_length);
auto length = strftime(dest.end(), max_length, "%H:%M:%S", &timetm);
auto length = strftime(dest.end(), max_length, "%Y-%m-%d %H:%M:%S", &timetm);
if(length < 0)
length = 0;

View File

@ -60,8 +60,8 @@ namespace logger {
tm* tm_info;
#ifdef WIN32
tm _tm_info{};
localtime_s(&_tm_info, &secs);
tm_info = &_tm_info;
localtime_s(&_tm_info, &secs);
tm_info = &_tm_info;
#else
tm_info = localtime((time_t*) &secs);
#endif