]> git.sur5r.net Git - i3/i3/blobdiff - include/log.h
log.h: tell the compiler these logging functions use printf-like formats
[i3/i3] / include / log.h
index 11555ab77a6aa4dad62dde897bd29ab0a66068ce..d3e967e77e2a206a065ddd9cf307b6ec3da811cb 100644 (file)
@@ -49,20 +49,23 @@ void set_verbosity(bool _verbose);
  * but only if debug logging was activated.
  *
  */
-void debuglog(char *fmt, ...);
+void debuglog(char *fmt, ...)
+    __attribute__ ((format (printf, 1, 2)));
 
 /**
  * Logs the given message to stdout while prefixing the current time to it.
  *
  */
-void errorlog(char *fmt, ...);
+void errorlog(char *fmt, ...)
+    __attribute__ ((format (printf, 1, 2)));
 
 /**
  * Logs the given message to stdout while prefixing the current time to it,
  * but only if verbose mode is activated.
  *
  */
-void verboselog(char *fmt, ...);
+void verboselog(char *fmt, ...)
+    __attribute__ ((format (printf, 1, 2)));
 
 /**
  * Logs the given message to stdout while prefixing the current time to it.