feat(GODT-3155): customize log formatter for easier parsing.

This commit is contained in:
Xavier Michelon 2024-01-09 09:24:21 +01:00
parent e63afd3910
commit 5751166ebc
1 changed files with 5 additions and 3 deletions

View File

@ -91,9 +91,11 @@ func (cs *coloredStdOutHook) Fire(entry *logrus.Entry) error {
// the default pruning algorithm.
func Init(logsPath string, sessionID SessionID, appName AppName, rotationSize, pruningSize int64, level string) (io.Closer, error) {
logrus.SetFormatter(&logrus.TextFormatter{
DisableColors: true,
FullTimestamp: true,
TimestampFormat: time.StampMilli,
DisableColors: true,
ForceQuote: true,
FullTimestamp: true,
QuoteEmptyFields: true,
TimestampFormat: "2006-01-02 15:04:05.000",
})
logrus.AddHook(newColoredStdOutHook())