Better sinks, better loggers, etx
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user