X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=src%2Fuglylogging.h;h=7099d919ca5c943a6cea164440f4e878b010fff3;hb=3c3b02e83e358edee5e704eb61b96d7d1561ff42;hp=fa34d460c61494155c9e9ceb846750e347d048df;hpb=83a5eb2ed34ed78edacd92a69f366b89728ac5d0;p=fw%2Fstlink diff --git a/src/uglylogging.h b/src/uglylogging.h index fa34d46..7099d91 100644 --- a/src/uglylogging.h +++ b/src/uglylogging.h @@ -1,4 +1,4 @@ -/* +/* * Ugly, low performance, configurable level, logging "framework" */ @@ -8,7 +8,7 @@ #ifdef __cplusplus extern "C" { #endif - + #define UDEBUG 90 #define UINFO 50 #define UWARN 30 @@ -18,6 +18,11 @@ extern "C" { int ugly_init(int maximum_threshold); int ugly_log(int level, const char *tag, const char *format, ...); +#define DLOG(format, args...) ugly_log(UDEBUG, __FILE__, format, ## args) +#define ILOG(format, args...) ugly_log(UINFO, __FILE__, format, ## args) +#define WLOG(format, args...) ugly_log(UWARN, __FILE__, format, ## args) +#define ELOG(format, args...) ugly_log(UERROR, __FILE__, format, ## args) +#define fatal(format, args...) ugly_log(UFATAL, __FILE__, format, ## args) #ifdef __cplusplus }