00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00036 #ifndef _DOWNLOAD_LOG_H_
00037 #define _DOWNLOAD_LOG_H_
00038
00039 #define DL_DISPLAY_ON 0
00040 #define DL_LOGGING_ON 0
00041 #define DL_MESSAGE_ON 1
00042 #define DL_WARNING_ON 1
00043 #define DL_ERROR_ON 1
00044
00045 #if (DL_DISPLAY_ON)
00046 #define DL_DMPRINTF(x, args...) fprintf(stderr, "(L)" __FILE__ ":%d,%s() " x "\n", __LINE__, __func__ , ##args)
00047 #else
00048 #define DL_DMPRINTF(x, args...) do {} while (0)
00049 #endif
00050
00051 #if (DL_LOGGING_ON)
00052 #define DL_LOGPRINTF(x, args...) fprintf(stderr, "(L)" __FILE__ ":%d,%s() " x "\n", __LINE__, __func__ , ##args)
00053 #else
00054 #define DL_LOGPRINTF(x, args...) do {} while (0)
00055 #endif
00056
00057 #if (DL_MESSAGE_ON)
00058 #define DL_MSGPRINTF(x, args...) fprintf(stderr, "(M)" __FILE__ ":%d,%s() " x "\n", __LINE__, __func__ , ##args)
00059 #else
00060 #define DL_MSGPRINTF(x, args...) do {} while (0)
00061 #endif
00062
00063 #if (DL_WARNING_ON)
00064 #define DL_WARNPRINTF(x, args...) fprintf(stderr, "(W)" __FILE__ ":%d,%s() " x "\n", __LINE__, __func__ , ##args)
00065 #else
00066 #define DL_WARNPRINTF(x, args...) do {} while (0)
00067 #endif
00068
00069 #if (DL_ERROR_ON)
00070 #define DL_ERRORPRINTF(x, args...) fprintf(stderr, "(E)" __FILE__ ":%d,%s() " x "\n", __LINE__, __func__ , ##args)
00071 #else
00072 #define DL_ERRORPRINTF(x, args...) do {} while (0)
00073 #endif
00074
00075 #endif //_DOWNLOAD_LOG_H_