src/server/daemon/log.c

changeset 115
51d9a15eac98
parent 99
b9a6af0ae41a
child 130
198ad9d8cec1
--- a/src/server/daemon/log.c	Wed Feb 10 12:19:56 2016 +0100
+++ b/src/server/daemon/log.c	Sat Oct 22 11:27:39 2016 +0200
@@ -49,6 +49,8 @@
 static int log_file_fd;
 static int log_level = 0;
 
+WSBool main_is_daemon(void);
+
 /*
  * if the log file is uninitialized, output is written to the ui_buffer
  */
@@ -168,6 +170,9 @@
     };
     
     writev(log_file_fd, io, 2); /* TODO: aio */
+    if(!main_is_daemon()) {
+        writev(STDOUT_FILENO, io, 2);
+    }
 }
 
 sstr_t log_get_prefix(int level) {

mercurial