aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/library_loader.c
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2026-08-01 18:51:59 +0200
committerdec05eba <dec05eba@protonmail.com>2026-08-01 18:51:59 +0200
commitc150d0e6ba0ab1f9ecd6a1c933a58050187e0c81 (patch)
tree3cae92f93009e87aeb2487afce569d6a20a8586c /src/library_loader.c
parent9c2c0e1d0de9b3968415b08830a45f64091d3b98 (diff)
Add gsr_log logging module with log level and overridable log handler
Diffstat (limited to 'src/library_loader.c')
-rw-r--r--src/library_loader.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/library_loader.c b/src/library_loader.c
index 0aeee9b..37a1767 100644
--- a/src/library_loader.c
+++ b/src/library_loader.c
@@ -1,4 +1,5 @@
#include "../include/library_loader.h"
+#include "../include/log.h"
#include <dlfcn.h>
#include <stdbool.h>
@@ -10,7 +11,7 @@ void* dlsym_print_fail(void *handle, const char *name, bool required) {
char *err_str = dlerror();
if(!sym)
- fprintf(stderr, "%s: dlsym(handle, \"%s\") failed, error: %s\n", required ? "error" : "warning", name, err_str ? err_str : "(null)");
+ gsr_log(required ? GSR_LOG_LEVEL_ERROR : GSR_LOG_LEVEL_WARNING, "dlsym(handle, \"%s\") failed, error: %s", name, err_str ? err_str : "(null)");
return sym;
}