Parsing commandline arguments

This commit is contained in:
2025-09-13 15:43:31 +02:00
parent dc3d80d707
commit e6891b39cc
18 changed files with 448 additions and 59 deletions

17
ulib/log.h Normal file
View File

@ -0,0 +1,17 @@
#ifndef ULIB_LOG_H_
#define ULIB_LOG_H_
#include <uprintf.h>
enum {
LOG_ERR,
LOG_DBG,
LOG_INF,
LOG_WRN,
};
static const char *_LOG_STR[] = { "ERROR", "DEBUG", "INFO", "WARNING" };
#define LOG(mode, fmt, ...) uprintf("%s: "fmt, _LOG_STR[(mode)], ##__VA_ARGS__);
#endif // ULIB_LOG_H_