]> git.ozlabs.org Git - petitboot/blobdiff - lib/log/log.h
ui/ncurses: Add widget_select_drop_options
[petitboot] / lib / log / log.h
index 813a19e293773fd9f72ad5c8092a7498d9b65a54..e34de33bbe6134ce23a8bcf0c009258e86084b6b 100644 (file)
@@ -1,10 +1,20 @@
 #ifndef _LOG_H
 #define _LOG_H
 
+#include <stdbool.h>
 #include <stdio.h>
 
-void pb_log(const char *fmt, ...);
-void pb_log_set_stream(FILE *stream);
-void pb_log_always_flush(int state);
+void __attribute__ ((format (printf, 1, 2))) pb_log(const char *fmt, ...);
+void __attribute__ ((format (printf, 1, 2))) pb_debug(const char *fmt, ...);
+
+void __pb_log_init(FILE *stream, bool debug);
+
+#ifdef DEBUG
+#define pb_log_init(s) __pb_log_init(s, true)
+#else
+#define pb_log_init(s) __pb_log_init(s, false)
+#endif
+
+FILE *pb_log_get_stream(void);
 
 #endif /* _LOG_H */