diff options
author | Loek Le Blansch <loek@pipeframe.xyz> | 2024-11-15 20:26:26 +0100 |
---|---|---|
committer | Loek Le Blansch <loek@pipeframe.xyz> | 2024-11-15 20:26:26 +0100 |
commit | 5bee4515c1089ce3499bc3b74780db94f0c02306 (patch) | |
tree | 3e18158665e45851b92c61095664fc16060c8fd2 /src/crepe/util/Log.cpp | |
parent | 8600b8a29351aae26ec7b22f84aeeef92d8cb421 (diff) |
process feedback on #26
Diffstat (limited to 'src/crepe/util/Log.cpp')
-rw-r--r-- | src/crepe/util/Log.cpp | 9 |
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(); } |