log: make Fields type a generic map[string]any

Decouple it from logrus, but with the same type.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn
2023-07-30 21:21:46 +02:00
parent 634a4a1bbf
commit 238da2c525
2 changed files with 27 additions and 1 deletions

View File

@@ -29,7 +29,7 @@ var L = logrus.NewEntry(logrus.StandardLogger())
type loggerKey struct{}
// Fields type to pass to "WithFields".
type Fields = logrus.Fields
type Fields = map[string]any
// Entry is a logging entry. It contains all the fields passed with
// [Entry.WithFields]. It's finally logged when Trace, Debug, Info, Warn,