};
/**
- * @brief Module Name String in 8 characters
+ * @brief Module Name String
*/
static const char *modulestr[_NEND] = {
- [_N1] = "N1/CommPl", [_N11] = "N11/IP ", [_N2] = "N2/Handlr", [_N21] = "N21/Host ",
- [_N3] = "N3/Sched ", [_N4] = "N4/InputC", [_N41] = "N41/HWrec", [_N42] = "N42/Host ",
- [_N5] = "N5/ThPool", [_N6] = "N6/Mem ", [_N61] = "N61/MemDe", [_N62] = "N62/MemPl",
- [_N7] = "N7/HWmem ", [_N71] = "N71/Model", [_N72] = "N72/Buff ", [_N73] = "N72/Segt ",
- [_N8] = "N8/HWmemI", [_N9] = "N9/NPUdrv", [_N91] = "N91/TRIV ", [_N92] = "N92/TRIV2",
- [_N93] = "N93/TRIA ", [_N94] = "N94/Emul ",
+ [_N0] = "N0/HostAPI", [_N1] = "N1/CommPlugin", [_N11] = "N11/CommIP",
+ [_N2] = "N2/Handler", [_N3] = "N3/Scheduler", [_N4] = "N4/InputService",
+ [_N41] = "N41/InputHW", [_N42] = "N42/InputHost", [_N5] = "N5/ThreadPool",
+ [_N6] = "N6/Memory", [_N61] = "N61/MemDef", [_N62] = "N62/MemPool",
+ [_N7] = "N7/HWmem", [_N71] = "N71/Model", [_N72] = "N72/Buff",
+ [_N73] = "N73/Segt", [_N8] = "N8/HWmemImpl", [_N9] = "N9/NPUdrv",
+ [_N91] = "N91/TRIV", [_N92] = "N92/TRIV2", [_N93] = "N93/TRIA",
+ [_N94] = "N94/Emul", [_N10] = "N10/Profiler",
};
/** @brief singleton instance */
int
Logger::logwrite_args (npu_loglevel l, const char *tag, const char *format, va_list args) {
std::unique_lock<std::mutex> lock (m_);
-
time_t ltime = time (nullptr);
char *time_str;
time_str[strcspn (time_str, "\n")] = '\x00';
char log_msg[MAX_LOG_MSG];
- int log_len = snprintf (log_msg, MAX_LOG_MSG, "[%s][%s][%s] ", loglevelstr[l], tag, time_str);
+ int log_len = snprintf (log_msg, MAX_LOG_MSG, "[%s][%s][%s] ", loglevelstr[l], time_str, tag);
log_len += vsnprintf (log_msg + log_len, MAX_LOG_MSG - log_len, format, args);