add "warn" log level

now that we are using slog, which has them.
and we already could use them for a deprecation warning.
This commit is contained in:
Mechiel Lukkien
2023-12-14 20:26:06 +01:00
parent 41e3d1af10
commit 1abadc5499
3 changed files with 16 additions and 2 deletions

View File

@ -1343,7 +1343,7 @@ func prepareDynamicConfig(ctx context.Context, log mlog.Log, dynamicPath string,
if !ok {
addErrorf("could not find localpart %q to replace with address in destinations", lp)
} else {
log.Error(`deprecation warning: support for account destination addresses specified as just localpart ("username") instead of full email address will be removed in the future; update domains.conf, for each Account, for each Destination, ensure each key is an email address by appending "@" and the default domain for the account`,
log.Warn(`deprecation warning: support for account destination addresses specified as just localpart ("username") instead of full email address will be removed in the future; update domains.conf, for each Account, for each Destination, ensure each key is an email address by appending "@" and the default domain for the account`,
slog.Any("localpart", lp),
slog.Any("address", addr),
slog.String("account", accName))