summary refs log tree commit diff
path: root/src/logging
diff options
context:
space:
mode:
Diffstat (limited to 'src/logging')
-rw-r--r--src/logging/Makefile.in2
-rw-r--r--src/logging/nm-logging.c13
-rw-r--r--src/logging/nm-logging.h29
3 files changed, 24 insertions, 20 deletions
diff --git a/src/logging/Makefile.in b/src/logging/Makefile.in
index 48a29b8f..2bc4cbac 100644
--- a/src/logging/Makefile.in
+++ b/src/logging/Makefile.in
@@ -42,7 +42,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/compiler_warnings.m4 \
 	$(top_srcdir)/m4/libnl-check.m4 $(top_srcdir)/m4/libtool.m4 \
 	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
 	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
-	$(top_srcdir)/configure.ac
+	$(top_srcdir)/m4/nls.m4 $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
 mkinstalldirs = $(install_sh) -d
diff --git a/src/logging/nm-logging.c b/src/logging/nm-logging.c
index c5f57a13..34884507 100644
--- a/src/logging/nm-logging.c
+++ b/src/logging/nm-logging.c
@@ -215,12 +215,13 @@ nm_logging_level_enabled (guint32 level)
 	return !!(log_level & level);
 }
 
-void _nm_log (const char *loc,
-              const char *func,
-              guint32 domain,
-              guint32 level,
-              const char *fmt,
-              ...)
+void
+_nm_log (const char *loc,
+         const char *func,
+         guint32 domain,
+         guint32 level,
+         const char *fmt,
+         ...)
 {
 	va_list args;
 	char *msg;
diff --git a/src/logging/nm-logging.h b/src/logging/nm-logging.h
index e4abcf75..b23f83a3 100644
--- a/src/logging/nm-logging.h
+++ b/src/logging/nm-logging.h
@@ -69,24 +69,27 @@ GQuark nm_logging_error_quark    (void);
 GType  nm_logging_error_get_type (void);
 
 
-#define nm_log_err(domain, fmt, args...) \
-	{ _nm_log (G_STRLOC, G_STRFUNC, domain, LOGL_ERR, fmt, ##args); }
+#define nm_log_err(domain, ...) \
+	_nm_log (G_STRLOC, G_STRFUNC, domain, LOGL_ERR, ## __VA_ARGS__ )
 
-#define nm_log_warn(domain, fmt, args...) \
-	{ _nm_log (G_STRLOC, G_STRFUNC, domain, LOGL_WARN, fmt, ##args); }
+#define nm_log_warn(domain, ...) \
+	_nm_log (G_STRLOC, G_STRFUNC, domain, LOGL_WARN, ## __VA_ARGS__ )
 
-#define nm_log_info(domain, fmt, args...) \
-	{ _nm_log (G_STRLOC, G_STRFUNC, domain, LOGL_INFO, fmt, ##args); }
+#define nm_log_info(domain, ...) \
+	_nm_log (G_STRLOC, G_STRFUNC, domain, LOGL_INFO, ## __VA_ARGS__ )
 
-#define nm_log_dbg(domain, fmt, args...) \
-	{ _nm_log (G_STRLOC, G_STRFUNC, domain, LOGL_DEBUG, fmt, ##args); }
+#define nm_log_dbg(domain, ...) \
+	_nm_log (G_STRLOC, G_STRFUNC, domain, LOGL_DEBUG, ## __VA_ARGS__ )
 
-#define nm_log(domain, level, fmt, args...) \
-	{ _nm_log (G_STRLOC, G_STRFUNC, domain, level, fmt, ##args); }
+#define nm_log(domain, level, ...) \
+	_nm_log (G_STRLOC, G_STRFUNC, domain, level, ## __VA_ARGS__ )
 
-void _nm_log (const char *loc, const char *func,
-              guint32 domain, guint32 level,
-              const char *fmt, ...);
+void _nm_log (const char *loc,
+              const char *func,
+              guint32 domain,
+              guint32 level,
+              const char *fmt,
+              ...) __attribute__((__format__ (__printf__, 5, 6)));
 
 const char *nm_logging_level_to_string (void);
 char *nm_logging_domains_to_string (void);