X-Git-Url: https://git.ozlabs.org/?a=blobdiff_plain;f=lib%2Flog%2Flog.h;fp=lib%2Flog%2Flog.h;h=2d4fd915f9716d81a6b3836d6c822cfae7d082ed;hb=679d9dceb5bdf51f118548ca2645dc81088a8974;hp=94545960f59690f0c087849a2c87b411f0249ccf;hpb=e2185d2c52325bd6695f79eff38dfab63cb0d49c;p=petitboot diff --git a/lib/log/log.h b/lib/log/log.h index 9454596..2d4fd91 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);