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

@@ -220,6 +220,11 @@ const char* LoadPersistent(
/* timestamp */
unsigned long long Now();
/* logging */
typedef std::function<void(unsigned int level, const char* file,
unsigned int line, const char* msg)> LogFunc;
void SetLogger(LogFunc func, unsigned int min_level);
} // namespace nt
#endif /* NTCORE_CPP_H_ */