mirror of
https://github.com/mjl-/mox.git
synced 2024-12-25 07:53:47 +03:00
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:
parent
94fb48c2dc
commit
f7b58c87b1
3 changed files with 5 additions and 5 deletions
|
@ -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),
|
||||
|
|
|
@ -783,7 +783,7 @@ func PrepareStaticConfig(ctx context.Context, log mlog.Log, configFile string, c
|
|||
}
|
||||
}
|
||||
if l.TLS.ACME != "" && (len(l.TLS.HostPrivateRSA2048Keys) == 0) != (len(l.TLS.HostPrivateECDSAP256Keys) == 0) {
|
||||
log.Error("warning: uncommon configuration with either only an RSA 2048 or ECDSA P256 host private key for DANE/ACME certificates; this ACME implementation can retrieve certificates for both type of keys, it is recommended to set either both or none; continuing")
|
||||
log.Warn("uncommon configuration with either only an RSA 2048 or ECDSA P256 host private key for DANE/ACME certificates; this ACME implementation can retrieve certificates for both type of keys, it is recommended to set either both or none; continuing")
|
||||
}
|
||||
|
||||
// TLS 1.2 was introduced in 2008. TLS <1.2 was deprecated by ../rfc/8996:31 and ../rfc/8997:66 in 2021.
|
||||
|
|
|
@ -117,7 +117,7 @@ func (a *Account) RetrainMessage(ctx context.Context, log mlog.Log, tx *bstore.T
|
|||
|
||||
words, err := jf.ParseMessage(p)
|
||||
if err != nil {
|
||||
log.Errorx("parsing message for updating junk filter", err, slog.Any("parse", ""))
|
||||
log.Infox("parsing message for updating junk filter", err, slog.Any("parse", ""))
|
||||
return nil
|
||||
}
|
||||
|
||||
|
@ -162,7 +162,7 @@ func (a *Account) TrainMessage(ctx context.Context, log mlog.Log, jf *junk.Filte
|
|||
|
||||
words, err := jf.ParseMessage(p)
|
||||
if err != nil {
|
||||
log.Errorx("parsing message for updating junk filter", err, slog.Any("parse", ""))
|
||||
log.Infox("parsing message for updating junk filter", err, slog.Any("parse", ""))
|
||||
return false, nil
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue