Log function names
authorRobert Swiecki <swiecki@google.com>
Fri, 15 May 2015 14:42:56 +0000 (16:42 +0200)
committerRobert Swiecki <swiecki@google.com>
Fri, 15 May 2015 14:42:56 +0000 (16:42 +0200)
contain.c
log.c
log.h
subproc.c

index a6cf60b8e98c681adf4a213ab301669f31206017..e8be0e7dd418040cd0674c2eec69e867add02eaa 100644 (file)
--- a/contain.c
+++ b/contain.c
@@ -350,7 +350,7 @@ bool containMakeFdsCOE(void)
 bool containSetupFD(struct nsjconf_t * nsjconf, int fd_in, int fd_out, int fd_err, int fd_log)
 {
        /* Make sure all logs go to the parent process from now on */
-       logNewLogFD(fd_log);
+       logRedirectLogFD(fd_log);
 
        if (nsjconf->mode != MODE_LISTEN_TCP) {
                if (nsjconf->is_silent == false) {
diff --git a/log.c b/log.c
index 01f18df2420a2b3edda567d11b60c85c3444a73c..19f6d5ee6fd2c448b08f07fac8f9501fe8358429 100644 (file)
--- a/log.c
+++ b/log.c
@@ -128,12 +128,12 @@ void logStop(int sig)
        LOG_I("Server stops due to fatal signal (%d) caught. Exiting", sig);
 }
 
-void logNewLogFD(int fd)
+void logRedirectLogFD(int fd)
 {
        log_fd = fd;
 }
 
-void logDirectly(const char *msg)
+void logDirectlyToFD(const char *msg)
 {
        dprintf(log_fd, "%s", msg);
 }
diff --git a/log.h b/log.h
index e16ff51d153a175a27d264f814d44de392a32d4b..647465fced473ca9497025749063ab89859e98a7 100644 (file)
--- a/log.h
+++ b/log.h
@@ -55,7 +55,7 @@ bool logInitLogFile(struct nsjconf_t *nsjconf, const char *logfile, bool is_verb
 void logLog(enum llevel_t ll, const char *fn, int ln, bool perr, const char *fmt, ...)
     __attribute__ ((format(printf, 5, 6)));
 void logStop(int sig);
-void logNewLogFD(int fd);
-void logDirectly(const char *msg);
+void logRedirectLogFD(int fd);
+void logDirectlyToFD(const char *msg);
 
 #endif                         /* _LOG_H */
index 808473266a27785b2256c204a93c2de1929fda6f..05b35e243628e215c5b98449a8cc6d40a12323a5 100644 (file)
--- a/subproc.c
+++ b/subproc.c
@@ -228,7 +228,7 @@ void subprocRunChild(struct nsjconf_t *nsjconf, int fd_in, int fd_out, int fd_er
        ssize_t sz;
        while ((sz = read(pipefd[0], log_buf, sizeof(log_buf) - 1)) > 0) {
                log_buf[sz] = '\0';
-               logDirectly(log_buf);
+               logDirectlyToFD(log_buf);
        }
        close(pipefd[0]);
        close(pipefd[1]);