aboutsummaryrefslogtreecommitdiff
path: root/src/log.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/log.h')
-rw-r--r--src/log.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/log.h b/src/log.h
index a426289..43b1894 100644
--- a/src/log.h
+++ b/src/log.h
@@ -8,8 +8,15 @@ enum imv_log_level {
IMV_ERROR
};
-void imv_log_set_level(enum imv_log_level level);
-
+/* Write to the log */
void imv_log(enum imv_log_level level, const char *fmt, ...);
+typedef void (*imv_log_callback)(enum imv_log_level level, const char *text, void *data);
+
+/* Subscribe to the log, callback is called whenever a log entry is written */
+void imv_log_add_log_callback(imv_log_callback callback, void *data);
+
+/* Unsubscribe from the log */
+void imv_log_remove_log_callback(imv_log_callback callback);
+
#endif