@@ -53,6 +53,7 @@ func (iss *ACMEIssuer) newACMEClientWithAccount(ctx context.Context, useTestCA,
53
53
// look up or create the ACME account
54
54
var account acme.Account
55
55
if iss .AccountKeyPEM != "" {
56
+ iss .Logger .Info ("using configured ACME account" )
56
57
account , err = iss .GetAccount (ctx , []byte (iss .AccountKeyPEM ))
57
58
} else {
58
59
account , err = iss .getAccount (ctx , client .Directory , iss .getEmail ())
@@ -63,6 +64,10 @@ func (iss *ACMEIssuer) newACMEClientWithAccount(ctx context.Context, useTestCA,
63
64
64
65
// register account if it is new
65
66
if account .Status == "" {
67
+ iss .Logger .Info ("ACME account has empty status; registering account with ACME server" ,
68
+ zap .Strings ("contact" , account .Contact ),
69
+ zap .String ("location" , account .Location ))
70
+
66
71
if iss .NewAccountFunc != nil {
67
72
// obtain lock here, since NewAccountFunc calls happen concurrently and they typically read and change the issuer
68
73
iss .mu .Lock ()
@@ -116,6 +121,9 @@ func (iss *ACMEIssuer) newACMEClientWithAccount(ctx context.Context, useTestCA,
116
121
if err != nil {
117
122
return nil , fmt .Errorf ("registering account %v with server: %w" , account .Contact , err )
118
123
}
124
+ iss .Logger .Info ("new ACME account registered" ,
125
+ zap .Strings ("contact" , account .Contact ),
126
+ zap .String ("status" , account .Status ))
119
127
120
128
// persist the account to storage
121
129
err = iss .saveAccount (ctx , client .Directory , account )
0 commit comments