mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice-common
synced 2026-08-06 20:37:02 +00:00
test-logging: Do not use G_PASTE to join level
"level" can have value "DEBUG". In some environment "DEBUG" is used as preprocessor name to enable some debugging code. Using -DDEBUG option (or similar) cause "DEBUG" to be defined as "1" so "G_PASTE(G_LOG_LEVEL_, level)" will be expanded to "G_LOG_LEVEL_1" instead of "G_LOG_LEVEL_DEBUG". Just concatenate the two literal to avoid "DEBUG" expansion. Signed-off-by: Frediano Ziglio <fziglio@redhat.com> Acked-by: Victor Toso <victortoso@redhat.com>
This commit is contained in:
parent
365d7019d5
commit
6a64d86d1d
@ -31,7 +31,7 @@
|
||||
va_list args; \
|
||||
\
|
||||
va_start (args, format); \
|
||||
g_logv(OTHER_LOG_DOMAIN, G_PASTE(G_LOG_LEVEL_, level), format, args); \
|
||||
g_logv(OTHER_LOG_DOMAIN, G_LOG_LEVEL_ ## level, format, args); \
|
||||
va_end (args); \
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user