mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-26 14:06:15 +01:00
gmessages: Only use structured logs if GLIB_VERSION_MAX_ALLOWED is ≥2.56
Only redefine g_message() and friends to use structured logging if the compiling code is OK with depending on GLib functionality from ≥2.56. Signed-off-by: Philip Withnall <withnall@endlessm.com> Fixes: #1847
This commit is contained in:
parent
517f756acf
commit
54f94b1303
@ -296,7 +296,7 @@ void g_log_structured_standard (const gchar *log_domain,
|
||||
#endif /* G_LOG_DOMAIN */
|
||||
|
||||
#if defined(G_HAVE_ISO_VARARGS) && !G_ANALYZER_ANALYZING
|
||||
#ifdef G_LOG_USE_STRUCTURED
|
||||
#if defined(G_LOG_USE_STRUCTURED) && GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_56
|
||||
#define g_error(...) G_STMT_START { \
|
||||
g_log_structured_standard (G_LOG_DOMAIN, G_LOG_LEVEL_ERROR, \
|
||||
__FILE__, G_STRINGIFY (__LINE__), \
|
||||
@ -345,7 +345,7 @@ void g_log_structured_standard (const gchar *log_domain,
|
||||
__VA_ARGS__)
|
||||
#endif
|
||||
#elif defined(G_HAVE_GNUC_VARARGS) && !G_ANALYZER_ANALYZING
|
||||
#ifdef G_LOG_USE_STRUCTURED
|
||||
#if defined(G_LOG_USE_STRUCTURED) && GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_56
|
||||
#define g_error(format...) G_STMT_START { \
|
||||
g_log_structured_standard (G_LOG_DOMAIN, G_LOG_LEVEL_ERROR, \
|
||||
__FILE__, G_STRINGIFY (__LINE__), \
|
||||
|
Loading…
Reference in New Issue
Block a user