Better sinks, better loggers, etx

This commit is contained in:
NaifBanana
2026-08-20 08:08:20 -05:00
parent 5415a01885
commit 9628a75710
14 changed files with 586 additions and 301 deletions
+6 -3
View File
@@ -1,3 +1,4 @@
#define _NB_AUTOLOG
#include <exception>
#include <NBCore/Errors.hpp>
@@ -29,17 +30,19 @@ const nb::ErrorCodeMap TestError::ErrorMessages{
};
int main() {
nb::logger.log("Whoop!");
while(!nb::LOGGER_RUNNING) {}
nb::logger.minimalLogLevel(0x0);
nb::logger.msg("Whoop!");
try {
THROW(TestError(0, TestError(1, TestError(2, TestError(3, TestError(2))))));
} catch (TestError e){
nb::logger.log("nb::Error was thrown!");
nb::logger.msg("nb::Error was thrown!");
}
try {
THROW(std::exception());
} catch (std::exception e){
nb::logger.log("std::exception was thrown!");
nb::logger.msg("std::exception was thrown!");
}
ERROR("hello there!");
return 0;