forked from TrueCloudLab/xk6-frostfs
[#190] logging: Use time format constants from stdlib
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
This commit is contained in:
parent
3c6023ca29
commit
3ebb3dda0a
1 changed files with 4 additions and 2 deletions
|
@ -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}
|
||||
|
|
Loading…
Reference in a new issue