Parsing commandline arguments
This commit is contained in:
17
ulib/log.h
Normal file
17
ulib/log.h
Normal 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_
|
Reference in New Issue
Block a user