tweaks to make work

This commit is contained in:
2026-07-23 22:41:47 -05:00
parent 86becee951
commit d091879773
2 changed files with 15 additions and 4 deletions

View File

@@ -10,6 +10,8 @@
#include <filesystem>
#include <algorithm>
#include <cstdarg>
#include <cerrno>
#include <cstring>
namespace fs = std::filesystem;
@@ -79,7 +81,7 @@ void LoggerService::write(std::string component, LogFlag flag, std::string messa
std::string componentTrace = "[" + configuration_.id + ": " + component + "] ";
finalmessage += componentTrace; // component is the section of the program (For example Mesh or Engine) that is calling the logger
std::string level = "";
level = LogFlagStrings[flag];
@@ -87,6 +89,9 @@ void LoggerService::write(std::string component, LogFlag flag, std::string messa
// level.append(7 - level.length(), ' ') pads out the level string with whitespace so every line is aligned the sam
finalmessage = finalmessage + "[" + level + "] ";
finalmessage = finalmessage + message + " ";
if(flag == LogFlag::Error) {
finalmessage += std::format("[errno = {} ({})]", errno, std::strerror(errno));
}
/* Removed because didn't want to bother with variadics + default arguments
if (configuration_.showSourceTrace) {