diff options
author | Omar Polo <op@omarpolo.com> | 2023-08-03 22:37:34 +0000 |
---|---|---|
committer | Omar Polo <op@omarpolo.com> | 2023-08-03 22:37:34 +0000 |
commit | 26df50981fe18b5f244293b203c1a1eb30759554 (patch) | |
tree | 9e8f3289a3bac25b4f79b2d065f37b406cb738ce /config.c | |
parent | 56054fe197b01c5e4e2ee433c752fcec79a09fd3 (diff) |
actually use the specified log style
Diffstat (limited to 'config.c')
-rw-r--r-- | config.c | 13 |
1 files changed, 12 insertions, 1 deletions
@@ -65,10 +65,11 @@ config_purge(struct conf *conf) struct alist *a, *ta; struct pki *pki, *tpki; struct address *addr, *taddr; - int use_privsep_crypto; + int use_privsep_crypto, log_format; ps = conf->ps; use_privsep_crypto = conf->use_privsep_crypto; + log_format = conf->log_format; free(conf->log_access); free_mime(&conf->mime); @@ -150,6 +151,7 @@ config_purge(struct conf *conf) conf->use_privsep_crypto = use_privsep_crypto; conf->protos = TLS_PROTOCOL_TLSv1_2 | TLS_PROTOCOL_TLSv1_3; conf->log_syslog = 1; + conf->log_format = log_format; init_mime(&conf->mime); TAILQ_INIT(&conf->fcgi); TAILQ_INIT(&conf->hosts); @@ -289,6 +291,10 @@ config_send(struct conf *conf) struct alist *a; size_t i; + if (proc_compose(ps, PROC_SERVER, IMSG_RECONF_LOG_FMT, + &conf->log_format, sizeof(conf->log_format)) == -1) + return -1; + for (i = 0; i < conf->mime.len; ++i) { m = &conf->mime.t[i]; if (proc_compose(ps, PROC_SERVER, IMSG_RECONF_MIME, @@ -528,6 +534,11 @@ config_recv(struct conf *conf, struct imsg *imsg) p = NULL; break; + case IMSG_RECONF_LOG_FMT: + IMSG_SIZE_CHECK(imsg, &conf->log_format); + memcpy(&conf->log_format, imsg->data, datalen); + break; + case IMSG_RECONF_MIME: IMSG_SIZE_CHECK(imsg, &m); memcpy(&m, imsg->data, datalen); |