Add logging framework.

DEBUG messages are completely optimized out if NDEBUG is defined.
This commit is contained in:
Peter Johnson
2015-07-31 22:41:26 -07:00
parent afcfdb13a0
commit 4356e313ec
9 changed files with 143 additions and 25 deletions

View File

@@ -13,6 +13,7 @@
#include <fstream>
#include "Dispatcher.h"
#include "Log.h"
#include "Storage.h"
namespace nt {
@@ -173,4 +174,10 @@ const char* LoadPersistent(
return nullptr;
}
void SetLogger(LogFunc func, unsigned int min_level) {
Logger& logger = Logger::GetInstance();
logger.SetLogger(func);
logger.set_min_level(min_level);
}
} // namespace nt