Add a field prefix to the deprecated log statements

To make theme easier to spot, esp. on INFO level.
This commit is contained in:
Bjørn Erik Pedersen
2023-11-01 15:21:21 +01:00
parent 80f793c38d
commit 4d38f47250
2 changed files with 8 additions and 8 deletions

View File

@@ -369,7 +369,7 @@ func DeprecateLevel(item, alternative, version string, level logg.Level) {
msg = fmt.Sprintf("%s was deprecated in Hugo %s and will be removed in a future release. %s", item, version, alternative)
}
loggers.Log().Logger().WithLevel(level).Logf(msg)
loggers.Log().Logger().WithLevel(level).WithField(loggers.FieldNameCmd, "deprecated").Logf(msg)
}
// We ususally do about one minor version a month.