wayland: clang-format
[staging/windowmanager.git] / src / util.c
index ee4b7b6..af32269 100644 (file)
@@ -11,7 +11,8 @@ struct strftime_cache {
    char buf[128];
 };
 
-void log_(char const *log_type, FILE *stream, char const *fmt, va_list args) {
+static void log_(char const *log_type, FILE *stream, char const *fmt,
+                 va_list args) {
    static struct strftime_cache strft;
 
    time_t t = time(NULL);
@@ -53,3 +54,12 @@ void fatal(char const *fmt, ...) {
    va_end(a);
    abort();
 }
+
+#ifdef DEBUG_OUTPUT
+void logdebug(char const *fmt, ...) {
+   va_list a;
+   va_start(a, fmt);
+   log_("debug", stdout, fmt, a);
+   va_end(a);
+}
+#endif