]> git.ozlabs.org Git - petitboot/blob - lib/log/log.h
discover/device-handler: Allow process_url request to be pending
[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 void pb_log_set_debug(bool debug);
19 FILE *pb_log_get_stream(void);
20
21 #endif /* _LOG_H */