aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/util/Log.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/crepe/util/Log.cpp')
-rw-r--r--src/crepe/util/Log.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/crepe/util/Log.cpp b/src/crepe/util/Log.cpp
index e583734..84d80a8 100644
--- a/src/crepe/util/Log.cpp
+++ b/src/crepe/util/Log.cpp
@@ -1,9 +1,8 @@
-#include <cstdarg>
-#include <cstdio>
-#include <cstdlib>
+#include <iostream>
#include <string>
#include "../api/Config.h"
+
#include "Log.h"
using namespace crepe;
@@ -33,6 +32,6 @@ void Log::log(const Level & level, const string & msg) {
if (!out.ends_with("\n")) out += "\n";
// TODO: also log to file or smth
- fwrite(out.c_str(), 1, out.size(), stdout);
- fflush(stdout);
+ cout.write(out.data(), out.size());
+ cout.flush();
}