mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
fix logfmt time field value formatting
This commit is contained in:
parent
b61bbbfd0f
commit
655e6fc1fd
1 changed files with 1 additions and 1 deletions
|
|
@ -177,7 +177,7 @@ func builtinReplace(_ []string, attr slog.Attr) slog.Attr {
|
||||||
switch attr.Key {
|
switch attr.Key {
|
||||||
case slog.TimeKey:
|
case slog.TimeKey:
|
||||||
if attr.Value.Kind() == slog.KindTime {
|
if attr.Value.Kind() == slog.KindTime {
|
||||||
return slog.Time("t", attr.Value.Time())
|
return slog.Any("t", attr.Value.Time().Format(timeFormat))
|
||||||
}
|
}
|
||||||
case slog.LevelKey:
|
case slog.LevelKey:
|
||||||
if l, ok := attr.Value.Any().(slog.Level); ok {
|
if l, ok := attr.Value.Any().(slog.Level); ok {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue