Skip to content

Commit 2621405

Browse files
authored
fix(logs): restore ISO 8601 timestamp format (#9493)
* fix(logs): restore ISO 8601 timestamp format Signed-off-by: Florian Wiegand <florian.wiegand@sap.com> * fix(logs): add release note for ISO 8601 timestamp fix Signed-off-by: Florian Wiegand <florian.wiegand@sap.com> --------- Signed-off-by: Florian Wiegand <florian.wiegand@sap.com>
1 parent a16d887 commit 2621405

2 files changed

Lines changed: 2 additions & 0 deletions

File tree

internal/logging/log.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,7 @@ func (l Logger) Sugar() *zap.SugaredLogger {
136136
func initZapLogger(w io.Writer, logging *egv1a1.EnvoyGatewayLogging, level egv1a1.LogLevel) *zap.Logger {
137137
parseLevel, _ := zapcore.ParseLevel(string(logging.DefaultEnvoyGatewayLoggingLevel(level)))
138138
cfg := zap.NewProductionEncoderConfig()
139+
cfg.EncodeTime = zapcore.ISO8601TimeEncoder
139140
var encoder zapcore.Encoder
140141
logEncoder := egv1a1.EnvoyGatewayLogEncoderText
141142
if logging != nil && logging.Encoder != nil {
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fixed log timestamps regressing to Unix epoch floats (e.g. `1.784e+09`) since v1.8.0 by explicitly setting `ISO8601TimeEncoder` on the production zap encoder config, restoring the expected ISO 8601 format (e.g. `2026-07-14T17:44:06.617Z`).

0 commit comments

Comments
 (0)