]> git.ipfire.org Git - people/ms/libloc.git/blobdiff - src/libloc/libloc.h
libloc: Allow passing a pointer to the log callback
[people/ms/libloc.git] / src / libloc / libloc.h
index 938ed75e0f1d77e4d28fd29e4c0e75f8e0c6fa2e..ea943a95d4cf2baa99c4d205a283c2e19e6e772f 100644 (file)
@@ -29,6 +29,18 @@ struct loc_ctx *loc_ref(struct loc_ctx* ctx);
 struct loc_ctx *loc_unref(struct loc_ctx* ctx);
 
 int loc_new(struct loc_ctx** ctx);
+
+typedef void (*loc_log_callback)(
+       struct loc_ctx* ctx,
+       void* data,
+       int priority,
+       const char* file,
+       int line,
+       const char* fn,
+       const char* format,
+       va_list args);
+void loc_set_log_callback(struct loc_ctx* ctx, loc_log_callback callback, void* data);
+
 void loc_set_log_fn(struct loc_ctx* ctx,
        void (*log_fn)(struct loc_ctx* ctx,
        int priority, const char* file, int line, const char* fn,