comparison common/logging.h @ 310:f758460ca437

Merged
author Sascha Wilde <wilde@intevation.de>
date Fri, 04 Apr 2014 09:54:19 +0200
parents b033b16dd290
children b1059360a0c7
comparison
equal deleted inserted replaced
309:fa37384b86b6 310:f758460ca437
54 #define DEBUGPRINTF(fmt, ...) fprintf(stderr, DEBUGPREFIX "DEBUG: " fmt, ##__VA_ARGS__); 54 #define DEBUGPRINTF(fmt, ...) fprintf(stderr, DEBUGPREFIX "DEBUG: " fmt, ##__VA_ARGS__);
55 #else 55 #else
56 #define DEBUGPRINTF(fmt, ...) 56 #define DEBUGPRINTF(fmt, ...)
57 #endif 57 #endif
58 58
59 /**
60 * @def DEBUGMSG(msg)
61 * @brief Prints a static debug message
62 *
63 * If DEBUGOUTPUT is defined this. Prints a debug message
64 * to stdout on Unix systems. On Windows OutputDebugString is used.
65 */
66 #ifdef DEBUGOUTPUT
67 # ifdef WIN32
68 # define DEBUGMSG(msg) OutputDebugString (msg);
69 # else
70 # define DEBUGMSG(msg) printf (DEBUGPREFIX "DEBUG: " msg "\n");
71 # endif
72 #else
73 # define DEBUGPRINTF(fmt, ...)
74 #endif
75
76
77 /**
78 * @def ERRORPRINTF(fmt, ...)
79 * @brief Debug printf
80 *
81 * Prints an error to stderr
82 */
83 #define ERRORPRINTF(fmt, ...) fprintf(stderr, DEBUGPREFIX "ERROR: " fmt, ##__VA_ARGS__);
84
85
86
59 #ifdef __cplusplus 87 #ifdef __cplusplus
60 } 88 }
61 #endif 89 #endif
62 90
63 #endif /* COMMON_LOGGING_H */ 91 #endif /* COMMON_LOGGING_H */

http://wald.intevation.org/projects/trustbridge/