Completed logging class to rudementary level. Extra operator overloadings still needed
This commit is contained in:
1 parent
7fa4d1fc58
commit
0dfda6f481
6 files changed
+87
-60
No files matched your search
@@ -1,30 +1,32 @@
|
||||
#include "ConfigManager.hpp"
|
||||
#include <iostream>
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
#include <string>
|
||||
|
||||
namespace Plains {
|
||||
namespace Core {
|
||||
|
||||
using std::cout;
|
||||
using std::endl;
|
||||
using std::string;
|
||||
|
||||
ConfigManager::ConfigManager(int numParameters, char **parameters) {
|
||||
ConfigManager::ConfigManager(Logger& logger, vector<string>& parameters) :
|
||||
logger(logger),
|
||||
parameters(parameters)
|
||||
{
|
||||
// move this to a function that can return an error code?
|
||||
if ( numParameters <= 1 ) return;
|
||||
cout << "Interpreting Paremters..." << endl;
|
||||
if ( parameters.size() == 0 ) return;
|
||||
logger.debug.ln("Interpreting Paremters...");
|
||||
|
||||
/*
|
||||
for (unsigned i = 0; i < (numParameters-1); ++i) {
|
||||
string p = string(parameters[i]);
|
||||
string v = string(parameters[i+1]);
|
||||
// Check if this parameter is an argument or an argument value:
|
||||
if ( p.compare(0,1,"-") == 0 ) {
|
||||
cout << "Interpreting parameter " << p << endl;
|
||||
if ( ! p.compare("--initial-peer") ) cout << "Peer " << v << " set" << endl;
|
||||
logger.debug("Interpreting parameter " << p);
|
||||
if ( ! p.compare("--initial-peer") ) logger.debug("Peer " << v << " set");
|
||||
}
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
|
||||
}}
|
||||
Reference in new issue
Block a user