summaryrefslogtreecommitdiff
path: root/log.h
diff options
context:
space:
mode:
Diffstat (limited to 'log.h')
-rw-r--r--log.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/log.h b/log.h
new file mode 100644
index 0000000..b739837
--- /dev/null
+++ b/log.h
@@ -0,0 +1,16 @@
+#ifndef LOG_H_
+#define LOG_H_
+
+#include "util.h"
+
+enum {
+ LOG_WARNING = 20,
+ LOG_ERROR = 30,
+};
+
+void log_init(const char *out);
+void log_message(int severity, const char *fmt, va_list args);
+void log_error(PRINTF_FORMAT_STRING const char *fmt, ...) ATTRIBUTE_PRINTF(1, 2);
+void log_warning(PRINTF_FORMAT_STRING const char *fmt, ...) ATTRIBUTE_PRINTF(1, 2);
+
+#endif