]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: acme: emit logs instead of ha_notice
authorWilliam Lallemand <wlallemand@haproxy.com>
Wed, 16 Apr 2025 12:39:39 +0000 (14:39 +0200)
committerWilliam Lallemand <wlallemand@haproxy.com>
Wed, 16 Apr 2025 12:39:39 +0000 (14:39 +0200)
Emit logs using the global logs when the ACME task failed or retries,
instead of using ha_notice().

src/acme.c

index ec780139ada44a025b5aea13d87191e60245dec4..dff19393078f463b880be87281a2cc1e2d26bc33 100644 (file)
@@ -26,6 +26,7 @@
 #include <haproxy/http_client.h>
 #include <haproxy/jws.h>
 #include <haproxy/list.h>
+#include <haproxy/log.h>
 #include <haproxy/ssl_ckch.h>
 #include <haproxy/ssl_sock.h>
 #include <haproxy/ssl_utils.h>
@@ -1680,11 +1681,11 @@ retry:
 
                for (i = 0; i < ACME_RETRY - ctx->retries; i++)
                        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);
 
        } 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;
        }