MM-34787: Add colored output for non JSON console logs (#17388)

* MM-34787: Add colored output for non JSON console logs

https://mattermost.atlassian.net/browse/MM-34787

```release-note
A new field EnableColor is added to LogSettings and NotificationLogSettings.
Non-JSON console logs will now be colored if that field is set to true.
```

* Trigger CI
Этот коммит содержится в:
Agniva De Sarker
2021-04-13 23:45:56 +05:30
коммит произвёл GitHub
родитель 6f87eb991f
Коммит fa16ecf98a
4 изменённых файлов: 20 добавлений и 4 удалений

Просмотреть файл

@@ -29,6 +29,7 @@ func MloggerConfigFromLoggerConfig(s *model.LogSettings, getFileFunc fileLocatio
FileJson: *s.FileJson,
FileLevel: strings.ToLower(*s.FileLevel),
FileLocation: getFileFunc(*s.FileLocation),
EnableColor: *s.EnableColor,
}
}
@@ -58,6 +59,7 @@ func GetLogSettingsFromNotificationsLogSettings(notificationLogSettings *model.N
FileLevel: notificationLogSettings.FileLevel,
FileLocation: notificationLogSettings.FileLocation,
AdvancedLoggingConfig: notificationLogSettings.AdvancedLoggingConfig,
EnableColor: notificationLogSettings.EnableColor,
}
}