X-Git-Url: https://git.ucc.asn.au/?p=ipdf%2Fcode.git;a=blobdiff_plain;f=src%2Flog.h;h=d49c1494328745081d65bf7909e32ff2bae33e04;hp=a98a8cc9c83ee17ba9dff596368516874266305f;hb=da646c739f87bf28c5a7af2bc180b93b3444321b;hpb=eff96d65bd1101083e04cb3ff2468b3feea3ff9e diff --git a/src/log.h b/src/log.h index a98a8cc..d49c149 100644 --- a/src/log.h +++ b/src/log.h @@ -9,6 +9,7 @@ #include #include #include +#include // for strerror etc inline std::string methodName(const std::string& prettyFunction) { @@ -36,6 +37,7 @@ inline std::string methodName(const std::string& prettyFunction) #define Debug(...) LogEx(LOG_DEBUG, __func__, __FILE__, __LINE__, __VA_ARGS__) #define Error(...) LogEx(LOG_ERR, __func__, __FILE__, __LINE__, __VA_ARGS__) #define Warn(...) LogEx(LOG_WARNING, __func__, __FILE__, __LINE__, __VA_ARGS__) +extern void Backtrace(int size=10); extern void LogEx(int level, const char * funct, const char * file, int line, ...); // General function for printing log messages to stderr