MM-18257 Converting to structured logging the file utils/i18n.… (#12095)
Этот коммит содержится в:
коммит произвёл
jfrerich
родитель
28cc7e7e36
Коммит
5fe5077578
@@ -67,7 +67,7 @@ func InitTranslationsWithDir(dir string) error {
|
|||||||
func GetTranslationsBySystemLocale() (i18n.TranslateFunc, error) {
|
func GetTranslationsBySystemLocale() (i18n.TranslateFunc, error) {
|
||||||
locale := *settings.DefaultServerLocale
|
locale := *settings.DefaultServerLocale
|
||||||
if _, ok := locales[locale]; !ok {
|
if _, ok := locales[locale]; !ok {
|
||||||
mlog.Error(fmt.Sprintf("Failed to load system translations for '%v' attempting to fall back to '%v'", locale, model.DEFAULT_LOCALE))
|
mlog.Error("Failed to load system translations for", mlog.String("locale", locale), mlog.String("attempting to fall back to default locale", model.DEFAULT_LOCALE))
|
||||||
locale = model.DEFAULT_LOCALE
|
locale = model.DEFAULT_LOCALE
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -80,7 +80,7 @@ func GetTranslationsBySystemLocale() (i18n.TranslateFunc, error) {
|
|||||||
return nil, fmt.Errorf("Failed to load system translations")
|
return nil, fmt.Errorf("Failed to load system translations")
|
||||||
}
|
}
|
||||||
|
|
||||||
mlog.Info(fmt.Sprintf("Loaded system translations for '%v' from '%v'", locale, locales[locale]))
|
mlog.Info("Loaded system translations", mlog.String("for locale", locale), mlog.String("from locale", locales[locale]))
|
||||||
return translations, nil
|
return translations, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user