aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/library_loader.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/library_loader.c')
-rw-r--r--src/library_loader.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/library_loader.c b/src/library_loader.c
index 0aeee9b..8b2e8a1 100644
--- a/src/library_loader.c
+++ b/src/library_loader.c
@@ -1,8 +1,8 @@
#include "../include/library_loader.h"
+#include "../include/log.h"
#include <dlfcn.h>
#include <stdbool.h>
-#include <stdio.h>
void* dlsym_print_fail(void *handle, const char *name, bool required) {
dlerror();
@@ -10,7 +10,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;
}