diff options
author | sanine <sanine.not@pm.me> | 2021-09-23 23:38:45 -0500 |
---|---|---|
committer | sanine <sanine.not@pm.me> | 2021-09-23 23:38:45 -0500 |
commit | f9f790c5cd3de6cd82ebf08c1f1695d411dd4a60 (patch) | |
tree | 7c1a7c551402c8f28dc3e391b3dab08f061e9b07 /src/logging/logging.h | |
parent | 1ca109e1770b56095bdf4c664f3b99b7ac93776d (diff) |
add honey_debug_()
Diffstat (limited to 'src/logging/logging.h')
-rw-r--r-- | src/logging/logging.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/logging/logging.h b/src/logging/logging.h index 87436e5..4357ae1 100644 --- a/src/logging/logging.h +++ b/src/logging/logging.h @@ -1,10 +1,22 @@ #ifndef HONEY_LOGGING_H #define HONEY_LOGGING_H +#include <stdio.h> + + struct honey_log_info { enum { DEBUG, INFO, WARN, ERROR, FATAL } log_level; + FILE *debug_out; + FILE *info_out; + FILE *warn_out; + FILE *error_out; + FILE *fatal_out; }; const char * honey_log_level_str_(struct honey_log_info *info); +#define honey_debug_(info, ...) \ + fprintf(info.debug_out, "[DEBUG] " __VA_ARGS__) + + #endif |