mirror of
https://github.com/yuanyuanxiang/SimpleRemoter.git
synced 2026-01-27 17:53:11 +08:00
Fix register schedule task failed issue and add logs
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user