X-Git-Url: http://git.ozlabs.org/?a=blobdiff_plain;f=lib%2Flog%2Flog.h;h=c2ad58eef6fc372f3ff586ac43ffb4447cd1dea2;hb=89cde533356d47b34a80679602c3900572b2dca6;hp=94545960f59690f0c087849a2c87b411f0249ccf;hpb=ae3c354e844698bdb4ed35a6845aa9dca1e9205f;p=petitboot diff --git a/lib/log/log.h b/lib/log/log.h index 9454596..c2ad58e 100644 --- a/lib/log/log.h +++ b/lib/log/log.h @@ -5,7 +5,17 @@ #include 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); @@ -16,6 +26,7 @@ void __pb_log_init(FILE *stream, bool debug); #endif void pb_log_set_debug(bool debug); +bool pb_log_get_debug(void); FILE *pb_log_get_stream(void); #endif /* _LOG_H */