]> git.ozlabs.org Git - petitboot/blobdiff - lib/log/log.h
lib/process: Add process_get_stdout
[petitboot] / lib / log / log.h
index e34de33bbe6134ce23a8bcf0c009258e86084b6b..c2ad58eef6fc372f3ff586ac43ffb4447cd1dea2 100644 (file)
@@ -5,7 +5,17 @@
 #include <stdio.h>
 
 void __attribute__ ((format (printf, 1, 2))) pb_log(const char *fmt, ...);
+void __attribute__ ((format (printf, 2, 3))) _pb_log_fn(const char *func,
+       const char *fmt, ...);
+#define pb_log_fn(args...) _pb_log_fn(__func__, args)
+
 void __attribute__ ((format (printf, 1, 2))) pb_debug(const char *fmt, ...);
+void __attribute__ ((format (printf, 2, 3))) _pb_debug_fn(const char *func,
+       const char *fmt, ...);
+#define pb_debug_fn(args...) _pb_debug_fn(__func__, args)
+void __attribute__ ((format (printf, 3, 4))) _pb_debug_fl(const char *func,
+       int line, const char *fmt, ...);
+#define pb_debug_fl(args...) _pb_debug_fl(__func__, __LINE__, args)
 
 void __pb_log_init(FILE *stream, bool debug);
 
@@ -15,6 +25,8 @@ void __pb_log_init(FILE *stream, bool debug);
 #define pb_log_init(s) __pb_log_init(s, false)
 #endif
 
+void pb_log_set_debug(bool debug);
+bool pb_log_get_debug(void);
 FILE *pb_log_get_stream(void);
 
 #endif /* _LOG_H */