MINOR: acme: emit logs instead of ha_notice

Emit logs using the global logs when the ACME task failed or retries,
instead of using ha_notice().
This commit is contained in:
William Lallemand 2025-04-16 14:39:39 +02:00
parent f36f9ca21c
commit 31a1d13802

View File

@ -26,6 +26,7 @@
#include <haproxy/http_client.h> #include <haproxy/http_client.h>
#include <haproxy/jws.h> #include <haproxy/jws.h>
#include <haproxy/list.h> #include <haproxy/list.h>
#include <haproxy/log.h>
#include <haproxy/ssl_ckch.h> #include <haproxy/ssl_ckch.h>
#include <haproxy/ssl_sock.h> #include <haproxy/ssl_sock.h>
#include <haproxy/ssl_utils.h> #include <haproxy/ssl_utils.h>
@ -1680,11 +1681,11 @@ retry:
for (i = 0; i < ACME_RETRY - ctx->retries; i++) for (i = 0; i < ACME_RETRY - ctx->retries; i++)
delay *= 3; delay *= 3;
ha_notice("acme: %s, retrying in %ds (%d/%d)...\n", errmsg ? errmsg : "", delay, ACME_RETRY - ctx->retries, ACME_RETRY); send_log(NULL, LOG_NOTICE, "acme: %s: %s, retrying in %ds (%d/%d)...\n", ctx->store->path, errmsg ? errmsg : "", delay, ACME_RETRY - ctx->retries, ACME_RETRY);
task->expire = tick_add(now_ms, delay * 1000); task->expire = tick_add(now_ms, delay * 1000);
} else { } else {
ha_notice("acme: %s, aborting. (%d/%d)\n", errmsg ? errmsg : "", ACME_RETRY-ctx->retries, ACME_RETRY); send_log(NULL, LOG_NOTICE,"acme: %s: %s, aborting. (%d/%d)\n", ctx->store->path, errmsg ? errmsg : "", ACME_RETRY-ctx->retries, ACME_RETRY);
goto end; goto end;
} }