Mercurial > trustbridge
annotate common/debug.h @ 228:19de529ce7fb
Moved debug prefix to macro and added component specific prefix.
author | Sascha Wilde <wilde@intevation.de> |
---|---|
date | Thu, 27 Mar 2014 18:31:26 +0100 |
parents | 29467940b07b |
children | 92b1e5ed2d5f |
rev | line source |
---|---|
172
7b9545ad76f6
Added include file with debugging macros.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
1 #ifndef DEBUG_H |
7b9545ad76f6
Added include file with debugging macros.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
2 #define DEBUG_H |
7b9545ad76f6
Added include file with debugging macros.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
3 |
7b9545ad76f6
Added include file with debugging macros.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
4 /** |
7b9545ad76f6
Added include file with debugging macros.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
5 * @file debug.h |
7b9545ad76f6
Added include file with debugging macros.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
6 * @brief Helper macros for debugging |
7b9545ad76f6
Added include file with debugging macros.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
7 */ |
7b9545ad76f6
Added include file with debugging macros.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
8 |
7b9545ad76f6
Added include file with debugging macros.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
9 /** |
7b9545ad76f6
Added include file with debugging macros.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
10 * @brief Debug printf |
7b9545ad76f6
Added include file with debugging macros.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
11 * |
7b9545ad76f6
Added include file with debugging macros.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
12 * Prints to stderr if RELEASE_BUILD is not defined. |
7b9545ad76f6
Added include file with debugging macros.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
13 */ |
7b9545ad76f6
Added include file with debugging macros.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
14 #ifndef RELEASE_BUILD |
228
19de529ce7fb
Moved debug prefix to macro and added component specific prefix.
Sascha Wilde <wilde@intevation.de>
parents:
227
diff
changeset
|
15 #define DEBUGPRINTF(fmt, ...) fprintf(stderr, DEBUGPREFIX "DEBUG: " fmt, ##__VA_ARGS__); |
172
7b9545ad76f6
Added include file with debugging macros.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
16 #else |
227
29467940b07b
Fixed naming of debugging print macro.
Sascha Wilde <wilde@intevation.de>
parents:
172
diff
changeset
|
17 #define DEBUGPRINTF(fmt, ...) |
172
7b9545ad76f6
Added include file with debugging macros.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
18 #endif |
7b9545ad76f6
Added include file with debugging macros.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
19 |
7b9545ad76f6
Added include file with debugging macros.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
20 #endif |