Skip to content

Commit a24dcae

Browse files
committed
fixup! ACME account login refactoring:
1 parent 13454a2 commit a24dcae

File tree

1 file changed

+9
-12
lines changed

1 file changed

+9
-12
lines changed

src/lib.rs

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -213,11 +213,10 @@ async fn ngx_http_acme_update_certificates(amcf: &AcmeMainConfig) -> Time {
213213
Ok(x) => x,
214214
Err(err) => {
215215
ngx_log_error!(
216-
NGX_LOG_INFO,
216+
NGX_LOG_WARN,
217217
log.as_ptr(),
218-
"update failed for acme issuer \"{}\": {}",
219-
issuer.name,
220-
err
218+
"{err} while processing renewals for acme issuer \"{}\"",
219+
issuer.name
221220
);
222221
now + ACME_DEFAULT_INTERVAL
223222
}
@@ -289,7 +288,7 @@ async fn ngx_http_acme_update_certificates_for_issuer(
289288
ngx_log_error!(
290289
NGX_LOG_INFO,
291290
log.as_ptr(),
292-
"acme account \"{}\" created for issuer \"{}\"",
291+
"account \"{}\" created for acme issuer \"{}\"",
293292
x,
294293
issuer.name
295294
);
@@ -298,7 +297,7 @@ async fn ngx_http_acme_update_certificates_for_issuer(
298297
Ok(acme::NewAccountOutput::Found(x)) => {
299298
ngx_log_debug!(
300299
log.as_ptr(),
301-
"acme account \"{}\" found for issuer \"{}\"",
300+
"account \"{}\" found for acme issuer \"{}\"",
302301
x,
303302
issuer.name
304303
);
@@ -307,9 +306,8 @@ async fn ngx_http_acme_update_certificates_for_issuer(
307306
ngx_log_error!(
308307
NGX_LOG_ERR,
309308
log.as_ptr(),
310-
"acme account validation failed for issuer \"{}\": {}",
311-
issuer.name,
312-
err
309+
"{err} while creating account for acme issuer \"{}\"",
310+
issuer.name
313311
);
314312
issuer.set_invalid(&err);
315313
return Ok(Time::MAX);
@@ -318,9 +316,8 @@ async fn ngx_http_acme_update_certificates_for_issuer(
318316
ngx_log_error!(
319317
NGX_LOG_WARN,
320318
log.as_ptr(),
321-
"acme account retrieval failed for issuer \"{}\": {}",
322-
issuer.name,
323-
err
319+
"{err} while creating account for acme issuer \"{}\"",
320+
issuer.name
324321
);
325322
return Ok(issuer.set_error(&err));
326323
}

0 commit comments

Comments
 (0)