Files
adsb-tools/adsbus/log.h

16 lines
445 B
C
Raw Normal View History

2016-03-05 22:54:26 -08:00
#pragma once
2016-03-07 11:26:25 -08:00
#include <stdbool.h>
2016-03-05 22:54:26 -08:00
#include <stdint.h>
2016-03-07 17:08:36 -08:00
#define LOG_STR(line) #line
#define LOG_LOC(file, line) (file ":" LOG_STR(line))
#define LOG(id, ...) log_write((log_module), LOG_LOC(__FILE__, __LINE__), (id), __VA_ARGS__)
2016-03-07 17:02:24 -08:00
void log_opts_add(void);
2016-03-05 22:54:26 -08:00
void log_init(void);
2016-03-07 16:14:35 -08:00
void log_init2(void);
2016-03-05 22:54:26 -08:00
void log_cleanup(void);
2016-03-07 17:08:36 -08:00
void log_write(char, const char *, const uint8_t *, const char *, ...)
__attribute__ ((__format__ (__printf__, 4, 5)));