From 3ebb3dda0aaf69c47e34b295b35878b47792ad19 Mon Sep 17 00:00:00 2001 From: Evgenii Stratonikov Date: Fri, 10 Jan 2025 13:52:06 +0300 Subject: [PATCH] [#190] logging: Use time format constants from stdlib Signed-off-by: Evgenii Stratonikov --- internal/logging/logging.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/internal/logging/logging.go b/internal/logging/logging.go index 90af29b..41632d3 100644 --- a/internal/logging/logging.go +++ b/internal/logging/logging.go @@ -1,6 +1,8 @@ package logging import ( + "time" + "github.com/dop251/goja" "github.com/sirupsen/logrus" "go.k6.io/k6/js/modules" @@ -60,9 +62,9 @@ func (r *RootModule) NewModuleInstance(vu modules.VU) modules.Instance { case *logrus.TextFormatter: f.ForceColors = true f.FullTimestamp = true - f.TimestampFormat = "15:04:05" + f.TimestampFormat = time.TimeOnly case *logrus.JSONFormatter: - f.TimestampFormat = "15:04:05" + f.TimestampFormat = time.TimeOnly } return &Logging{vu: vu}