instead of using loglevel error for printing a warning, just log it as "warn" error level, and don't log message parsing errors as loglevel error

This commit is contained in:
Mechiel Lukkien
2024-12-07 19:06:16 +01:00
parent 94fb48c2dc
commit f7b58c87b1
3 changed files with 5 additions and 5 deletions

View File

@ -312,12 +312,12 @@ func (m *Manager) SetAllowedHostnames(log mlog.Log, resolver dns.Resolver, hostn
for _, h := range added {
ips, _, err := resolver.LookupIP(ctx, "ip", h.ASCII+".")
if err != nil {
log.Errorx("warning: acme tls cert validation for host may fail due to dns lookup error", err, slog.Any("host", h))
log.Warnx("acme tls cert validation for host may fail due to dns lookup error", err, slog.Any("host", h))
continue
}
for _, ip := range ips {
if _, ok := publicIPstrs[ip.String()]; !ok {
log.Error("warning: acme tls cert validation for host is likely to fail because not all its ips are being listened on",
log.Warn("acme tls cert validation for host is likely to fail because not all its ips are being listened on",
slog.Any("hostname", h),
slog.Any("listenedips", publicIPs),
slog.Any("hostips", ips),