aboutsummaryrefslogtreecommitdiffstats
path: root/src/reader.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2021-01-13 20:00:25 +0100
committerDavid Robillard <d@drobilla.net>2023-12-02 18:49:08 -0500
commit456bdeef35ffbfbdad7609e8b8a4ef71372786fd (patch)
tree25fabaa4f361f66a2bac860f06722e7f51776cbc /src/reader.c
parentfc2114a10769349d38b3215bc95ded855a2be5b6 (diff)
downloadserd-456bdeef35ffbfbdad7609e8b8a4ef71372786fd.tar.gz
serd-456bdeef35ffbfbdad7609e8b8a4ef71372786fd.tar.bz2
serd-456bdeef35ffbfbdad7609e8b8a4ef71372786fd.zip
[WIP] Add extensible logging API
Diffstat (limited to 'src/reader.c')
-rw-r--r--src/reader.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/reader.c b/src/reader.c
index 6f5ccce6..f34f7974 100644
--- a/src/reader.c
+++ b/src/reader.c
@@ -17,6 +17,7 @@
#include "world.h"
#include "serd/input_stream.h"
+#include "serd/log.h"
#include <assert.h>
#include <stdarg.h>
@@ -32,8 +33,10 @@ r_err(SerdReader* const reader, const SerdStatus st, const char* const fmt, ...)
{
va_list args; // NOLINT(cppcoreguidelines-init-variables)
va_start(args, fmt);
- const SerdError e = {st, &reader->source->caret, fmt, &args};
- serd_world_error(reader->world, &e);
+
+ serd_vlogf_at(
+ reader->world, SERD_LOG_LEVEL_ERROR, &reader->source->caret, fmt, args);
+
va_end(args);
return st;
}