Error logging almost working!

This commit is contained in:
NaifBanana
2026-06-11 04:24:06 -05:00
parent 40cf079e9d
commit 0f62aecfa3
8 changed files with 73 additions and 31 deletions
+14
View File
@@ -1,10 +1,24 @@
#include <iostream>
#include "Logger.hpp"
#include "StringUtils.hpp"
namespace nb {
#ifndef _NB_NO_LOGGER
nb::DefaultDebugLogger logger(std::cout);
#endif // _NB_NO_LOGGER
bool nb::DefaultDebugLogger::process(const LogEvent& msg) {
for (const auto os : this->_ostream) {
*os << indent_strblock(
msg.msg,
std::string(10, ' '),
"[ "+std::to_string(msg.lvl)+" ] : "
) << nb::NEWLINE;
}
return true;
}
static bool RUN_LOGGER(nb::DefaultDebugLogger& log) {
return log.run();