Source
50
50
#define INFO(FMT,...) TRACE(3, "INFO: " FMT, ##__VA_ARGS__)
51
51
#else
52
52
#define ERROR(FMT,...)
53
53
#define DEBUG(FMT,...)
54
54
#define INFO(FMT,...)
55
55
#endif
56
56
57
57
#ifdef BUILDOS_QNX
58
58
#include <sys/slog.h>
59
59
#define TRACE(lvl,FMT, ...) do if ((lvl) <= dce_debug) { \
60
-
slogf(42, _SLOG_INFO, "%s:%d:\t%s\terror: " FMT, __FILE__, __LINE__, __FUNCTION__, ##__VA_ARGS__); \
60
+
slogf(42, _SLOG_INFO, "%s:%d:\t%s\t" FMT, __FILE__, __LINE__, __FUNCTION__, ##__VA_ARGS__); \
61
61
} while( 0 )
62
62
63
63
#elif defined BUILDOS_LINUX
64
64
#define TRACE(lvl,FMT, ...) do if ((lvl) <= dce_debug) { \
65
-
printf("%s:%d:\t%s\t Error: "FMT,__FILE__, __LINE__,__FUNCTION__ ,##__VA_ARGS__); \
65
+
printf("%s:%d:\t%s\t" FMT,__FILE__, __LINE__,__FUNCTION__ ,##__VA_ARGS__); \
66
66
}while( 0 )
67
67
68
68
#elif defined BUILDOS_ANDROID
69
69
#include <utils/Log.h>
70
70
#define LOG_TAG "libdce"
71
71
#define TRACE(lvl,FMT, ...) do if ((lvl) <= dce_debug) { \
72
-
ALOGE("%s:%d:\t%s\t Error: "FMT,__FILE__, __LINE__,__FUNCTION__ ,##__VA_ARGS__); \
72
+
ALOGE("%s:%d:\t%s\t" FMT,__FILE__, __LINE__,__FUNCTION__ ,##__VA_ARGS__); \
73
73
}while( 0 )
74
74
#endif
75
75
76
76
/***************** ASSERT MACROS *********************/
77
77
#define _ASSERT_AND_EXECUTE(_COND_, _ERRORCODE_, _EXPR_) do { \
78
78
if( !(_COND_)) { eError = _ERRORCODE_; \
79
79
ERROR("Failed %s error val %d", # _COND_, _ERRORCODE_); \
80
80
_EXPR_; \
81
81
goto EXIT; } \
82
82
} while( 0 )