snippets/c/report/report.h

29 lines
813 B
C

/* ----------------------------------------------------------------------------
* C-Report
* ----------------------------------------------------------------------------
* Author : Markus Koch <markus@notsyncing.net>
* Contributors : None
* License : Mozilla Public License (MPL) Version 2
* ----------------------------------------------------------------------------
*/
#ifndef REPORT_H
#define REPORT_H
#include <errno.h>
enum log_level {LL_CRITICAL = 0,
LL_ERROR,
LL_WARNING,
LL_INFO,
LL_DEBUG,
LL_NOISY,
LL_COUNT};
int should_report(enum log_level log_level);
enum log_level report(enum log_level log_level, const char *format, ...);
void set_log_level(enum log_level log_level);
enum log_level get_log_level();
#endif // REPORT_H