summaryrefslogtreecommitdiff
path: root/src/logging/logging.h
blob: 69ea88edc9c536be81873a3da29246e841f09681 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#ifndef HONEY_LOGGING_H
#define HONEY_LOGGING_H

#include <stdio.h>


struct honey_log_info_t {
   enum { FATAL, ERROR, WARN, INFO, DEBUG } log_level;
   FILE *debug_out;
   FILE *info_out;
   FILE *warn_out;
   FILE *error_out;
   FILE *fatal_out;
};

extern struct honey_log_info_t honey_log_info;

const char * honey_log_level_str();

void honey_debug(const char *fmt, ...);
void honey_info(const char *fmt, ...);
void honey_warn(const char *fmt, ...);
void honey_error(const char *fmt, ...);
void honey_fatal(const char *fmt, ...);

#endif