2024-05-05 18:09:00 +02:00
|
|
|
#ifndef JSONLOGGER_H
|
|
|
|
#define JSONLOGGER_H
|
|
|
|
|
|
|
|
/*!
|
|
|
|
* \file
|
|
|
|
*
|
|
|
|
* \brief A structured logger.
|
|
|
|
*
|
|
|
|
* \details
|
|
|
|
* This module provides structured log output (in JSON format) for debugging
|
|
|
|
* purposes. It opens a named pipe (FIFO) and writes JSON objects to them as
|
|
|
|
* soon as a program opens the reading end.
|
|
|
|
*
|
|
|
|
* Each JSON object is written as a single line.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <stdint.h>
|
|
|
|
#include <stdbool.h>
|
|
|
|
|
|
|
|
#include "debug_structs.h"
|
|
|
|
|
|
|
|
bool jsonlogger_init(const char *fifoname);
|
|
|
|
void jsonlogger_shutdown(void);
|
|
|
|
|
|
|
|
bool jsonlogger_log_simple_integer(const char *msg_type, int64_t value);
|
|
|
|
bool jsonlogger_log_simple_double(const char *msg_type, double value);
|
|
|
|
|
|
|
|
bool jsonlogger_log_rx_stats(const rx_stats_t *rx_stats);
|
2024-05-07 21:40:29 +02:00
|
|
|
bool jsonlogger_log_rx_packet_info(const rx_packet_dbg_t *rx_packet_dbg);
|
2024-05-05 18:09:00 +02:00
|
|
|
|
|
|
|
#endif // JSONLOGGER_H
|