Using logger for config

This commit is contained in:
jojos38
2020-01-28 18:37:57 +01:00
parent ea3d6204d3
commit dbaf7d5de0
3 changed files with 8 additions and 2 deletions

View File

@@ -6,6 +6,7 @@
#include <iostream>
#include <fstream>
#include <string>
#include "logger.h"
using namespace std; //nameSpace STD
void GenerateConfig();
string RemoveComments(string Line);
@@ -23,7 +24,7 @@ void ParseConfig(){
ifstream InFileStream;
InFileStream.open("Server.cfg");
if(InFileStream.good()){ //Checks if Config Exists
cout << "Config Found Updating Values \n\n";
info("Config Found Updating Values");
string line;
int index = 1;
while (getline(InFileStream, line)) {
@@ -35,7 +36,7 @@ void ParseConfig(){
}
SetMainValues(D,P,M,S); //gives the values to Main
}else{
cout << "Config Not Found Generating A new One \n";
info("Config Not Found Generating A new One");
GenerateConfig();
}
InFileStream.close();