aboutsummaryrefslogtreecommitdiff
path: root/ge.c
diff options
context:
space:
mode:
authorOmar Polo <op@omarpolo.com>2023-06-06 11:46:40 +0000
committerOmar Polo <op@omarpolo.com>2023-06-06 11:46:40 +0000
commiteae52ad493f582222b4f2b748c0043c42bb851cb (patch)
tree0cc9aa41b31d831984e39cb2b14ab2cc05a0f83d /ge.c
parent58fae4ea901aed6b093c5a336eb09abe6efe5880 (diff)
switch to the more usual log.c
Diffstat (limited to 'ge.c')
-rw-r--r--ge.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/ge.c b/ge.c
index 51060f8..e310714 100644
--- a/ge.c
+++ b/ge.c
@@ -26,9 +26,11 @@
#include <libgen.h>
#include <signal.h>
#include <string.h>
+#include <syslog.h>
#include <unistd.h>
#include "logger.h"
+#include "log.h"
struct imsgbuf ibuf, logibuf;
struct conf conf;
@@ -184,7 +186,7 @@ serve(const char *host, int port, const char *dir)
fatal("%s", cause);
freeaddrinfo(res0);
- log_notice(NULL, "serving %s on port %d", dir, port);
+ log_info("serving %s on port %d", dir, port);
return server_main(NULL, sock, -1);
}
@@ -209,6 +211,8 @@ main(int argc, char **argv)
setlocale(LC_CTYPE, "");
+ log_init(1, LOG_DAEMON);
+ log_setverbose(0);
logger_init();
config_init();
@@ -251,7 +255,6 @@ main(int argc, char **argv)
certs_dir = data_dir();
/* set up the implicit vhost and location */
-
host = xcalloc(1, sizeof(*host));
TAILQ_INSERT_HEAD(&hosts, host, vhosts);