34 #define DEBUG_ENABLED true
36#define DEBUG_ENABLED true
39#define NSU_REG_BWIDTH 4
41#define DEBUG_PRINT(message) debugPrint("func", __func__, message)
42#define DEBUG_PRINT_CLASS(message) debugPrint(typeid(*this).name(), __func__, message)
62inline void debugPrint(
const std::string &className,
const std::string &functionName,
const std::string &message) {
65 auto now = std::chrono::system_clock::now();
68 auto time_since_epoch = now.time_since_epoch();
69 auto seconds = std::chrono::duration_cast<std::chrono::seconds>(time_since_epoch);
70 auto milliseconds = std::chrono::duration_cast<std::chrono::milliseconds>(time_since_epoch - seconds);
73 std::time_t time_now = std::chrono::system_clock::to_time_t(now);
74 std::tm* local_time = localtime(&time_now);
77 std::cout <<
"[" << std::put_time(local_time,
"%F %T") <<
"." << std::setw(3) << std::setfill(
'0')
78 << milliseconds.count() <<
"] ";
79 std::cout <<
"DEBUG (" << className <<
"::" << functionName <<
"): " << message << std::endl;
void debugPrint(const std::string &className, const std::string &functionName, const std::string &message)
std::string NSU_DLLEXPORT status2_string(nsukitStatus_t status)
std::string NSU_DLLEXPORT api_info()