mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
express built-in time key as String attribute instead of Any
This commit is contained in:
parent
655e6fc1fd
commit
d960dc8fa7
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.Any("t", attr.Value.Time().Format(timeFormat))
|
return slog.String("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