From 064ac24c10560c2bd091a185d839e30c41ccf2e2 Mon Sep 17 00:00:00 2001 From: Suraxius Date: Mon, 11 Jan 2021 20:57:44 +0100 Subject: [PATCH] wip --- src/core/Logger.cpp | 9 +++------ src/core/include/Logger.hpp | 1 - 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/src/core/Logger.cpp b/src/core/Logger.cpp index 03de75d..c1bd50a 100644 --- a/src/core/Logger.cpp +++ b/src/core/Logger.cpp @@ -18,12 +18,9 @@ Logger::Logger(enum Level logLevel) : { output = new ofstream("plains.log"); - if (!output) { - cerr << "Unable to open Logfile!" << endl; - //std::ostream osteam(); - //aoutput = cout; - //output->rdbuf(cout.rdbuf()); - //output.rdbuf(NULL); + if (!(*output)) { + cout << "Unable to open Logfile! writing to /tmp/plains.log" << endl; + output = new ofstream("/tmp/plains.log"); } else { debug << "Logfile successfully opened!" << commit; diff --git a/src/core/include/Logger.hpp b/src/core/include/Logger.hpp index a0705ee..f239490 100644 --- a/src/core/include/Logger.hpp +++ b/src/core/include/Logger.hpp @@ -2,7 +2,6 @@ #define LOGGER_HPP #include #include -#include namespace Plains { namespace Core {