fix_: use UTC format for geth.log timestamp (#5370)

This commit is contained in:
richΛrd 2024-06-19 15:08:48 -04:00 committed by GitHub
parent d00df557c7
commit 2b7d153826
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 8 additions and 8 deletions

2
go.mod
View File

@ -4,7 +4,7 @@ go 1.21
toolchain go1.21.8 toolchain go1.21.8
replace github.com/ethereum/go-ethereum v1.10.26 => github.com/status-im/go-ethereum v1.10.25-status.13 replace github.com/ethereum/go-ethereum v1.10.26 => github.com/status-im/go-ethereum v1.10.25-status.14
replace github.com/rjeczalik/notify => github.com/status-im/notify v1.0.2-status replace github.com/rjeczalik/notify => github.com/status-im/notify v1.0.2-status

4
go.sum
View File

@ -2019,8 +2019,8 @@ github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/y
github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg=
github.com/status-im/doubleratchet v3.0.0+incompatible h1:aJ1ejcSERpSzmWZBgtfYtiU2nF0Q8ZkGyuEPYETXkCY= github.com/status-im/doubleratchet v3.0.0+incompatible h1:aJ1ejcSERpSzmWZBgtfYtiU2nF0Q8ZkGyuEPYETXkCY=
github.com/status-im/doubleratchet v3.0.0+incompatible/go.mod h1:1sqR0+yhiM/bd+wrdX79AOt2csZuJOni0nUDzKNuqOU= github.com/status-im/doubleratchet v3.0.0+incompatible/go.mod h1:1sqR0+yhiM/bd+wrdX79AOt2csZuJOni0nUDzKNuqOU=
github.com/status-im/go-ethereum v1.10.25-status.13 h1:BIQB1MEY5m/D0pd4zXF1psKgyHMmnC+HZ+liJfB4tmY= github.com/status-im/go-ethereum v1.10.25-status.14 h1:fYIVUc/589fXDuK6re6jwezcBz6QP+xFeErW/SWbZK4=
github.com/status-im/go-ethereum v1.10.25-status.13/go.mod h1:Dt4K5JYMhJRdtXJwBEyGZLZn9iz/chSOZyjVmt5ZhwQ= github.com/status-im/go-ethereum v1.10.25-status.14/go.mod h1:Dt4K5JYMhJRdtXJwBEyGZLZn9iz/chSOZyjVmt5ZhwQ=
github.com/status-im/go-multiaddr-ethv4 v1.2.5 h1:pN+ey6wYKbvNNu5/xq9+VL0N8Yq0pZUTbZp0URg+Yn4= github.com/status-im/go-multiaddr-ethv4 v1.2.5 h1:pN+ey6wYKbvNNu5/xq9+VL0N8Yq0pZUTbZp0URg+Yn4=
github.com/status-im/go-multiaddr-ethv4 v1.2.5/go.mod h1:Fhe/18yWU5QwlAYiOO3Bb1BLe0bn5YobcNBHsjRr4kk= github.com/status-im/go-multiaddr-ethv4 v1.2.5/go.mod h1:Fhe/18yWU5QwlAYiOO3Bb1BLe0bn5YobcNBHsjRr4kk=
github.com/status-im/go-sqlcipher/v4 v4.5.4-status.2 h1:Oi9JTAI2DZEe5UKlpUcvKBCCSn3ULsLIrix7jPnEoPE= github.com/status-im/go-sqlcipher/v4 v4.5.4-status.2 h1:Oi9JTAI2DZEe5UKlpUcvKBCCSn3ULsLIrix7jPnEoPE=

View File

@ -114,15 +114,15 @@ func TerminalFormat(usecolor bool) Format {
// Assemble and print the log heading // Assemble and print the log heading
if color > 0 { if color > 0 {
fmt.Fprintf(b, "\x1b[%dm%s\x1b[0m[%s|%s]%s %s ", color, lvl, r.Time.Format(termTimeFormat), location, padding, r.Msg) fmt.Fprintf(b, "\x1b[%dm%s\x1b[0m[%s|%s]%s %s ", color, lvl, r.Time.UTC().Format(termTimeFormat), location, padding, r.Msg)
} else { } else {
fmt.Fprintf(b, "%s[%s|%s]%s %s ", lvl, r.Time.Format(termTimeFormat), location, padding, r.Msg) fmt.Fprintf(b, "%s[%s|%s]%s %s ", lvl, r.Time.UTC().Format(termTimeFormat), location, padding, r.Msg)
} }
} else { } else {
if color > 0 { if color > 0 {
fmt.Fprintf(b, "\x1b[%dm%s\x1b[0m[%s] %s ", color, lvl, r.Time.Format(termTimeFormat), r.Msg) fmt.Fprintf(b, "\x1b[%dm%s\x1b[0m[%s] %s ", color, lvl, r.Time.UTC().Format(termTimeFormat), r.Msg)
} else { } else {
fmt.Fprintf(b, "%s[%s] %s ", lvl, r.Time.Format(termTimeFormat), r.Msg) fmt.Fprintf(b, "%s[%s] %s ", lvl, r.Time.UTC().Format(termTimeFormat), r.Msg)
} }
} }
// try to justify the log output for short messages // try to justify the log output for short messages

2
vendor/modules.txt vendored
View File

@ -211,7 +211,7 @@ github.com/edsrzf/mmap-go
## explicit; go 1.14 ## explicit; go 1.14
github.com/elastic/gosigar github.com/elastic/gosigar
github.com/elastic/gosigar/sys/windows github.com/elastic/gosigar/sys/windows
# github.com/ethereum/go-ethereum v1.10.26 => github.com/status-im/go-ethereum v1.10.25-status.13 # github.com/ethereum/go-ethereum v1.10.26 => github.com/status-im/go-ethereum v1.10.25-status.14
## explicit; go 1.17 ## explicit; go 1.17
github.com/ethereum/go-ethereum github.com/ethereum/go-ethereum
github.com/ethereum/go-ethereum/accounts github.com/ethereum/go-ethereum/accounts