summaryrefslogtreecommitdiffstats
path: root/web/server/h2o/http_server.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--web/server/h2o/http_server.c (renamed from httpd/http_server.c)16
1 files changed, 8 insertions, 8 deletions
diff --git a/httpd/http_server.c b/web/server/h2o/http_server.c
index 24b168d92..3a46889c2 100644
--- a/httpd/http_server.c
+++ b/web/server/h2o/http_server.c
@@ -78,17 +78,17 @@ static int ssl_init()
/* load certificate and private key */
if (SSL_CTX_use_PrivateKey_file(accept_ctx.ssl_ctx, key_fn, SSL_FILETYPE_PEM) != 1) {
- error("Could not load server key from \"%s\"", key_fn);
+ netdata_log_error("Could not load server key from \"%s\"", key_fn);
return -1;
}
if (SSL_CTX_use_certificate_file(accept_ctx.ssl_ctx, cert_fn, SSL_FILETYPE_PEM) != 1) {
- error("Could not load certificate from \"%s\"", cert_fn);
+ netdata_log_error("Could not load certificate from \"%s\"", cert_fn);
return -1;
}
h2o_ssl_register_alpn_protocols(accept_ctx.ssl_ctx, h2o_http2_alpn_protocols);
- info("SSL support enabled");
+ netdata_log_info("SSL support enabled");
return 0;
}
@@ -239,7 +239,7 @@ static int netdata_uberhandler(h2o_handler_t *self, h2o_req_t *req)
uuid_unparse_lower(host->host_uuid, host_uuid_str);
if (!ret) {
- log_access("HTTPD OK method: " PRINTF_H2O_IOVEC_FMT
+ netdata_log_access("HTTPD OK method: " PRINTF_H2O_IOVEC_FMT
", path: " PRINTF_H2O_IOVEC_FMT
", as host: %s"
", response: %d",
@@ -248,7 +248,7 @@ static int netdata_uberhandler(h2o_handler_t *self, h2o_req_t *req)
host == localhost ? "localhost" : host_uuid_str,
req->res.status);
} else {
- log_access("HTTPD %d"
+ netdata_log_access("HTTPD %d"
" method: " PRINTF_H2O_IOVEC_FMT
", path: " PRINTF_H2O_IOVEC_FMT
", forwarding to file handler as path: " PRINTF_H2O_IOVEC_FMT,
@@ -284,7 +284,7 @@ static int hdl_netdata_conf(h2o_handler_t *self, h2o_req_t *req)
#define POLL_INTERVAL 100
-void *httpd_main(void *ptr) {
+void *h2o_main(void *ptr) {
struct netdata_static_thread *static_thread = (struct netdata_static_thread *)ptr;
h2o_pathconf_t *pathconf;
@@ -318,14 +318,14 @@ void *httpd_main(void *ptr) {
accept_ctx.hosts = config.hosts;
if (create_listener(bind_addr, bind_port) != 0) {
- error("failed to create listener %s:%d", bind_addr, bind_port);
+ netdata_log_error("failed to create listener %s:%d", bind_addr, bind_port);
return NULL;
}
while (service_running(SERVICE_HTTPD)) {
int rc = h2o_evloop_run(ctx.loop, POLL_INTERVAL);
if (rc < 0 && errno != EINTR) {
- error("h2o_evloop_run returned (%d) with errno other than EINTR. Aborting", rc);
+ netdata_log_error("h2o_evloop_run returned (%d) with errno other than EINTR. Aborting", rc);
break;
}
}