log error?
Some checks failed
Build / Build Game (push) Has been cancelled

This commit is contained in:
2026-02-28 23:14:33 -05:00
parent d016768ca9
commit 68d5301735
2 changed files with 32 additions and 2 deletions

28
CMakeSettings.json Normal file
View File

@@ -0,0 +1,28 @@
{
"configurations": [
{
"name": "x64-Debug",
"generator": "Ninja",
"configurationType": "Debug",
"inheritEnvironments": [
"msvc_x64_x64"
],
"buildRoot": "${projectDir}\\out\\build\\${name}",
"cmakeCommandArgs": "",
"buildCommandArgs": "",
"ctestCommandArgs": ""
},
{
"name": "x64-Release",
"generator": "Ninja",
"configurationType": "Release",
"inheritEnvironments": [
"msvc_x64_x64"
],
"buildRoot": "${projectDir}\\out\\build\\${name}",
"cmakeCommandArgs": "",
"buildCommandArgs": "",
"ctestCommandArgs": ""
}
]
}

View File

@@ -1,10 +1,10 @@
#include "log.hpp"
#include <cstdio>
#include <exception>
#include <iomanip>
#include <iostream>
#include <mutex>
#include <print>
#include <sstream>
#include <streambuf>
#include <thread>
@@ -61,7 +61,9 @@ namespace game
void Logger::write_raw(const std::string& message)
{
std::println("{}", message);
std::fwrite(message.c_str(), 1, message.size(), stdout);
std::fwrite("\n", 1, 1, stdout);
std::fflush(stdout);
if (file.is_open()) file << message << '\n' << std::flush;
}