3#include <cpptrace/cpptrace.hpp>
10#define OS_FUNCTION_SIGNATURE __FUNCSIG__
12#define OS_FUNCTION_SIGNATURE __PRETTY_FUNCTION__
15#define __FILENAME__ (strrchr(__FILE__, '/') ? strrchr(__FILE__, '/') + 1 : __FILE__)
16#define LOG_DEBUG(msg) \
17 std::cout << "[DEBUG] " << __FILENAME__ << ":" << __LINE__ << " - " << OS_FUNCTION_SIGNATURE \
18 << ": " << msg << std::endl
19#define LOG_INFO(msg) std::cout << "[INFO] " << msg << std::endl
20#define LOG_WARN(msg) std::cout << "[WARN] " << msg << std::endl
21#define LOG_ERROR(msg) \
22 throw std::runtime_error(std::string("[maiacore] ") + msg + "\nSource File: " + \
23 std::string(__FILENAME__) + " - Line " + std::to_string(__LINE__) + \
24 "\nFunction: " + std::string(OS_FUNCTION_SIGNATURE) + "\n\n" + \
25 cpptrace::generate_raw_trace().resolve().to_string(true))