remove logging to file

added some doc
This commit is contained in:
2020-04-30 12:16:29 +02:00
parent 7cf8e965b0
commit 9d33964b93
7 changed files with 16 additions and 40 deletions

View File

@@ -3,9 +3,7 @@
//
#include <fstream>
#include <ctime>
#include <iostream>
#include <sstream>
#include "FileLogger.h"
@@ -28,22 +26,3 @@ std::string FileLogger::readip() {
return ip;
}
void FileLogger::logToLogfile(std::string text) {
std::ofstream out;
out.open("dynurefresher.log", std::ios::out | std::ios::app);
std::time_t t = std::time(0); // get time now
std::tm *now = std::localtime(&t);
std::stringstream logline;
logline << "[ " << (now->tm_year + 1900) << '-' << (now->tm_mon + 1) << '-' << now->tm_mday
<< "_" << now->tm_hour << ":" << now->tm_min << ":" << now->tm_sec << " ] " << '\t' << text << std::endl;
out << logline.str();
out.close();
}