X-Git-Url: http://git.ozlabs.org/?p=petitboot;a=blobdiff_plain;f=lib%2Flog%2Flog.h;h=e34de33bbe6134ce23a8bcf0c009258e86084b6b;hp=3e92555a12c62a104694860faa3fa9419c1bfec4;hb=350ef03d554a4c8f67e22bdf89fa888554f0b75e;hpb=dae4540e417e2bf72dd83b2713a670bde0056ba9 diff --git a/lib/log/log.h b/lib/log/log.h index 3e92555..e34de33 100644 --- a/lib/log/log.h +++ b/lib/log/log.h @@ -1,9 +1,20 @@ #ifndef _LOG_H #define _LOG_H +#include #include -void pb_log(const char *fmt, ...); -void pb_log_set_stream(FILE *stream); +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 */