diff options
author | Danny Holman <dholman@gymli.org> | 2022-11-18 09:56:13 -0600 |
---|---|---|
committer | Danny Holman <dholman@gymli.org> | 2022-11-18 09:56:13 -0600 |
commit | be4f102b8aa16bb90ed7d8d51a84650987dfdb40 (patch) | |
tree | dde4c8c59c384914c23b0127b1588a467c1d7027 /server/include | |
parent | 23ff71d1709d4d564e1b8d86e0c8486722310dd3 (diff) |
server: add a logging framework
Add a logging framework so the server can output to a single point.
Signed-off-by: Danny Holman <dholman@gymli.org>
Diffstat (limited to 'server/include')
-rw-r--r-- | server/include/logging.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/server/include/logging.h b/server/include/logging.h new file mode 100644 index 0000000..a964230 --- /dev/null +++ b/server/include/logging.h @@ -0,0 +1,18 @@ +#ifndef MRAT_LOGGING_H +#define MRAT_LOGGING_H + +#include <stdio.h> +#include <stdarg.h> + +enum LOG_LEVEL { + LOG_SEVERE, + LOG_WARNING, + LOG_INFO, + LOG_DEBUG, +}; + +int init_logging(FILE *out_file); +int vlog_msg(int level, const char *fmt, va_list args); +int log_msg(int level, const char *fmt, ...); + +#endif |