18 lines
296 B
C
18 lines
296 B
C
#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_
|