]> git.sur5r.net Git - i3/i3/blobdiff - include/libi3.h
logging: make libi3 use verboselog()/errorlog(), provide it in each caller
[i3/i3] / include / libi3.h
index 45ba970f5ba88729a3f09944736d5388ce953ce9..d4df901fe4cde7400a895d4d2e6d585f93590a92 100644 (file)
@@ -69,10 +69,12 @@ struct Font {
 /* Since this file also gets included by utilities which don’t use the i3 log
  * infrastructure, we define a fallback. */
 #if !defined(LOG)
-#define LOG(fmt, ...) fprintf(stdout, "[libi3] " __FILE__ " " fmt, ##__VA_ARGS__)
+void verboselog(char *fmt, ...);
+#define LOG(fmt, ...) verboselog("[libi3] " __FILE__ " " fmt, ##__VA_ARGS__)
 #endif
 #if !defined(ELOG)
-#define ELOG(fmt, ...) fprintf(stderr, "[libi3] ERROR: " fmt, ##__VA_ARGS__)
+void errorlog(char *fmt, ...);
+#define ELOG(fmt, ...) errorlog("[libi3] ERROR: " fmt, ##__VA_ARGS__)
 #endif
 
 /**