Commit Diff


commit - 0c64c2f8032e7c3de8b5b3ca5c5bd9047b89b17c
commit + 5abbba2d467df0d641100b74fbe24428fbb1c2c6
blob - 858cf85ab602d28a7ce1fc715b2de0d6f6e19ddd
blob + 9b7b6853658f6996141e0355f9a0a6f08fca0c7c
--- gotwebd/gotwebd.c
+++ gotwebd/gotwebd.c
@@ -129,6 +129,9 @@ main(int argc, char **argv)
 	env = calloc(1, sizeof(*env));
 	if (env == NULL)
 		fatal("%s: calloc", __func__);
+
+	/* log to stderr until daemonized */
+	log_init(1, LOG_DAEMON);
 
 	/* XXX: add s and S for both sockets */
 	while ((ch = getopt(argc, argv, "D:df:I:nP:v")) != -1) {
@@ -168,9 +171,6 @@ main(int argc, char **argv)
 		}
 	}
 
-	/* log to stderr until daemonized */
-	log_init(env->gotwebd_debug ? env->gotwebd_debug : 1, LOG_DAEMON);
-
 	argc -= optind;
 	if (argc > 0)
 		usage();