X-Git-Url: http://git.ozlabs.org/?p=petitboot;a=blobdiff_plain;f=lib%2Flog%2Flog.h;h=94545960f59690f0c087849a2c87b411f0249ccf;hp=2a5d375d8cdfe38951042daa46e9458d178f1ade;hb=17d9d54a46beab44db751b9bcf7f289b9bf101cf;hpb=5d0a6df4644525bf5fbd9d98f3aa4a23a0c03cb4 diff --git a/lib/log/log.h b/lib/log/log.h index 2a5d375..9454596 100644 --- a/lib/log/log.h +++ b/lib/log/log.h @@ -1,11 +1,21 @@ #ifndef _LOG_H #define _LOG_H +#include #include -void 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_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 + +void pb_log_set_debug(bool debug); +FILE *pb_log_get_stream(void); #endif /* _LOG_H */