Index: src/libs/zbxnix/daemon.c
===================================================================
--- src/libs/zbxnix/daemon.c	(revision 58286)
+++ src/libs/zbxnix/daemon.c	(revision 58287)
@@ -371,7 +371,7 @@
 		if (-1 == chdir("/"))	/* this is to eliminate warning: ignoring return value of chdir */
 			assert(0);
 
-		zbx_handle_log();
+		zbx_redirect_stdio(LOG_TYPE_FILE == CONFIG_LOG_TYPE ? CONFIG_LOG_FILE : NULL);
 	}
 
 	if (FAIL == create_pid_file(CONFIG_PID_FILE))
