diff --git a/server/public/model/config.go b/server/public/model/config.go index 8422ea56d8..b29f4c3737 100644 --- a/server/public/model/config.go +++ b/server/public/model/config.go @@ -1292,7 +1292,7 @@ func NewLogSettings() *LogSettings { func (s *LogSettings) isValid() *AppError { cfg := make(mlog.LoggerConfiguration) - err := json.Unmarshal(s.GetAdvancedLoggingConfig(), &cfg) + err := json.Unmarshal(s.AdvancedLoggingJSON, &cfg) if err != nil { return NewAppError("LogSettings.isValid", "model.config.is_valid.log.advanced_logging.json", map[string]any{"Error": err}, "", http.StatusBadRequest).Wrap(err) } diff --git a/server/public/model/config_test.go b/server/public/model/config_test.go index 48d7956059..b4824c3c3b 100644 --- a/server/public/model/config_test.go +++ b/server/public/model/config_test.go @@ -1297,6 +1297,12 @@ func TestLogSettingsIsValid(t *testing.T) { }, ExpectError: false, }, + "AdvancedLoggingConfig contains filepath": { + LogSettings: LogSettings{ + AdvancedLoggingConfig: sToP("/some/Path"), + }, + ExpectError: false, + }, } { t.Run(name, func(t *testing.T) { test.LogSettings.SetDefaults()