Fix register schedule task failed issue and add logs

This commit is contained in:
shaun
2025-12-12 09:24:36 +01:00
parent 9e7856a818
commit 2160922ba0
11 changed files with 127 additions and 51 deletions

View File

@@ -258,3 +258,16 @@ inline const char* getFileName(const char* path)
#endif
#endif // _WIN32
inline void Log(const char* message) {
return Logger::getInstance().log(NULL, 0, "%s", message);
}
inline void Logf(const char* file, int line, const char* format, ...) {
va_list args;
va_start(args, format);
char message[1024];
vsnprintf(message, sizeof(message), format, args);
va_end(args);
return Logger::getInstance().log(getFileName(file), line, "%s", message);
}