Error logging almost working!

This commit is contained in:
NaifBanana
2026-05-18 01:35:28 -05:00
parent 01ddba733d
commit 32ca555c49
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();