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

5
.gitignore vendored
View File

@ -440,3 +440,8 @@ out/build/x86-Debug/.cmake/api/v1/reply/index-2020-01-28T12-30-44-0946.json
out/build/x86-Debug/.cmake/api/v1/reply/codemodel-v2-3eaabe43603befc605b1.json
out/build/x86-Debug/.cmake/api/v1/reply/target-cmake-main-Debug-70eff68e1e381b42992e.json
*.xml
out/build/x86-Debug/.cmake/api/v1/reply/target-enet-Debug-48db38ae5d08e27876b8.json
out/build/x86-Debug/.cmake/api/v1/reply/target-cmake-main-Debug-540e487569703b71c785.json
out/build/x86-Debug/.cmake/api/v1/reply/index-2020-01-28T17-35-38-0764.json
out/build/x86-Debug/.cmake/api/v1/reply/codemodel-v2-6a61e390ef8eaf17e9f8.json
out/build/x86-Debug/Server.cfg

BIN
enet.lib Normal file

Binary file not shown.

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();