]> git.ozlabs.org Git - petitboot/blobdiff - lib/log/log.h
bootstrap: Add dependency checks
[petitboot] / lib / log / log.h
index 6f44bea0d38ac1fd9bd543676757ce47af788a64..94545960f59690f0c087849a2c87b411f0249ccf 100644 (file)
@@ -1,11 +1,21 @@
 #ifndef _LOG_H
 #define _LOG_H
 
+#include <stdbool.h>
 #include <stdio.h>
 
 void __attribute__ ((format (printf, 1, 2))) pb_log(const char *fmt, ...);
-void pb_log_set_stream(FILE *stream);
-FILE * pb_log_get_stream(void);
-void pb_log_always_flush(int state);
+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
+
+void pb_log_set_debug(bool debug);
+FILE *pb_log_get_stream(void);
 
 #endif /* _LOG_H */