wip
This commit is contained in:
1 parent
a5997c9187
commit
194772a539
2 files changed
+9
-6
No files matched your search
+1
-1
@@ -16,7 +16,7 @@ Logger::Logger(enum Level logLevel) :
|
|||||||
warn(WARN, *this),
|
warn(WARN, *this),
|
||||||
fatal(FATAL, *this)
|
fatal(FATAL, *this)
|
||||||
{
|
{
|
||||||
output = new ofstream("plains.log");
|
output = new ofstream("plains.log", std::ios_base::app);
|
||||||
|
|
||||||
if (!(*output)) {
|
if (!(*output)) {
|
||||||
cout << "Unable to open Logfile! writing to /tmp/plains.log" << endl;
|
cout << "Unable to open Logfile! writing to /tmp/plains.log" << endl;
|
||||||
|
|||||||
+8
-5
@@ -4,19 +4,22 @@
|
|||||||
#include <vector>
|
#include <vector>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
int main(int args, char **argv) {
|
|
||||||
|
|
||||||
using namespace Plains;
|
using namespace Plains;
|
||||||
using namespace Core;
|
using namespace Core;
|
||||||
using std::vector;
|
using std::vector;
|
||||||
using std::string;
|
using std::string;
|
||||||
|
|
||||||
|
|
||||||
|
int main(int args, char **argv) {
|
||||||
|
Logger logger(Logger::DEBUG);
|
||||||
|
logger.info.ln ("Starting PlaiNS...");
|
||||||
|
|
||||||
|
try{
|
||||||
vector<string> arguments;
|
vector<string> arguments;
|
||||||
for ( unsigned index = 0; index < args; ++index ) {
|
for ( unsigned index = 0; index < args; ++index ) {
|
||||||
arguments.push_back (argv[index]);
|
arguments.push_back (argv[index]);
|
||||||
}
|
}
|
||||||
Logger logger(Logger::DEBUG);
|
|
||||||
try{
|
|
||||||
ConfigManager cfg(logger, arguments);
|
ConfigManager cfg(logger, arguments);
|
||||||
EventBus eventBus(logger);
|
EventBus eventBus(logger);
|
||||||
Resolver::Server resolver(logger, eventBus);
|
Resolver::Server resolver(logger, eventBus);
|
||||||
@@ -24,7 +27,7 @@ int main(int args, char **argv) {
|
|||||||
//Record testrec = ARecord();
|
//Record testrec = ARecord();
|
||||||
logger.debug.ln ("Running DNS resolver...");
|
logger.debug.ln ("Running DNS resolver...");
|
||||||
resolver.run();
|
resolver.run();
|
||||||
logger.debug.ln ("PlaiNS successfully started.");
|
logger.info.ln ("PlaiNS successfully started.");
|
||||||
}
|
}
|
||||||
catch (std::exception& e)
|
catch (std::exception& e)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in new issue
Block a user