From 0f33bb1fbdab1833d3f898a08cbf215920f7198b Mon Sep 17 00:00:00 2001 From: Ikey Doherty Date: Sun, 22 Oct 2017 00:39:24 +0100 Subject: [PATCH] redirect: Start using log functions Signed-off-by: Ikey Doherty --- src/redirect/main.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/redirect/main.c b/src/redirect/main.c index 9d50fd7..2184293 100644 --- a/src/redirect/main.c +++ b/src/redirect/main.c @@ -21,6 +21,7 @@ #include #include "../common/files.h" +#include "../common/log.h" #include "nica/util.h" #include "redirect.h" @@ -149,7 +150,7 @@ __attribute__((constructor)) static void lsi_redirect_init(void) return; } - fprintf(stderr, "Enabled lsi_redirect for: %s\n", process_name); + lsi_log_debug("Enable lsi_redirect for '%s'", process_name); } static char *lsi_redirect_replace_path(const char *path) @@ -178,12 +179,12 @@ static char *lsi_redirect_replace_path(const char *path) } if (!lsi_file_exists(transformed_path)) { - fprintf(stderr, "Target path does not exist: %s\n", new_path); + lsi_log_warn("Target path does not exist: %s", new_path); free(transformed_path); return strdup(path); } - fprintf(stderr, "Replaced '%s' with '%s'\n", path, transformed_path); + lsi_log_info("Replaced '%s' with '%s'", path, transformed_path); return transformed_path; }