diff --git a/emper/Debug.hpp b/emper/Debug.hpp index 4b6240172603b1725c09e0b67fdc3c6eedac9871..e265b7df41b7b563f87e60fc23db49bf233c5f82 100644 --- a/emper/Debug.hpp +++ b/emper/Debug.hpp @@ -3,6 +3,7 @@ #include <iostream> #include <sstream> #include <map> +#include <cstdlib> #ifdef NDEBUG @@ -24,6 +25,8 @@ #define LOGI(x) do { std::stringstream sst; sst << x; logI(sst.str()); } while (false) +#define ABORT(x) do { std::stringstream sst; sst << x; logI(sst.str()); abort(); } while (false) + enum class LogSubsystem { PS, F, @@ -116,6 +119,10 @@ protected: worker_log(sst.str(), string); } + inline void logE(const std::string& string) const { + log(Error, string); + } + inline void logI(const std::string& string) const { log(Info, string); }