X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=include%2Fappcore-internal.h;h=c1f9bb304173ca7a23e6371270404811841e707f;hb=c646b936aeb68ae78194ec6e713459beca58afe5;hp=97e84a7bde193b17f38def383709933dc4f8a553;hpb=eb4eec8c3f6270f68d6f1b4584d681ca078f4637;p=platform%2Fcore%2Fappfw%2Fapp-core.git diff --git a/include/appcore-internal.h b/include/appcore-internal.h index 97e84a7..c1f9bb3 100644 --- a/include/appcore-internal.h +++ b/include/appcore-internal.h @@ -37,26 +37,18 @@ #endif #ifndef _DLOG_H_ -# define _ERR(fmt, arg...) \ - do { fprintf(stderr, "appcore: "fmt"\n", ##arg); } while (0) - -# define _INFO(fmt, arg...) \ - do { fprintf(stdout, fmt"\n", ##arg); } while (0) - -# define _DBG(fmt, arg...) \ +#define _ERR(fmt, arg...) fprintf(stderr, "appcore: "fmt"\n", ##arg) +#define _INFO(fmt, arg...) fprintf(stdout, fmt"\n", ##arg) +#define _DBG(fmt, arg...) \ do { \ if (getenv("APPCORE_DEBUG")) { \ fprintf(stdout, fmt"\n", ##arg); \ } \ } while (0) #else -# define _ERR(fmt, arg...) \ - do { \ - fprintf(stderr, "appcore: "fmt"\n", ##arg); \ - LOGE(fmt, ##arg); \ - } while (0) -# define _INFO(...) LOGI(__VA_ARGS__) -# define _DBG(...) LOGD(__VA_ARGS__) +#define _ERR(fmt, arg...) LOGE(fmt, ##arg) +#define _INFO(...) LOGI(__VA_ARGS__) +#define _DBG(...) LOGD(__VA_ARGS__) #endif #define _warn_if(expr, fmt, arg...) do { \