]> git.ozlabs.org Git - petitboot/blob - lib/log/log.h
discover: Allow device_handler_boot with no option
[petitboot] / lib / log / log.h
1 #ifndef _LOG_H
2 #define _LOG_H
3
4 #include <stdbool.h>
5 #include <stdio.h>
6
7 void __attribute__ ((format (printf, 1, 2))) pb_log(const char *fmt, ...);
8 void __attribute__ ((format (printf, 1, 2))) pb_debug(const char *fmt, ...);
9
10 void __pb_log_init(FILE *stream, bool debug);
11
12 #ifdef DEBUG
13 #define pb_log_init(s) __pb_log_init(s, true)
14 #else
15 #define pb_log_init(s) __pb_log_init(s, false)
16 #endif
17
18 FILE *pb_log_get_stream(void);
19
20 #endif /* _LOG_H */