MM-28859 Add feature flag managment system using split.io and remove viper. (#15954)
* Add feature flag managment system using split.io and remove viper. * Fixing tests. * Attempt to fix postgres tests. * Fix watch filepath for advanced logging. * Review fixes. * Some error wrapping. * Remove unessisary store interface. * Desanitize SplitKey * Simplify. * Review feedback. * Rename split mlog adatper to split logger. * fsInner * Style. * Restore oldcfg test. * Downgrading non-actionable feature flag errors to warnings. Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
8bb772638c
Коммит
1aadd36644
35
config/split_logger.go
Обычный файл
35
config/split_logger.go
Обычный файл
@@ -0,0 +1,35 @@
|
||||
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
||||
// See LICENSE.txt for license information.
|
||||
|
||||
package config
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/mattermost/mattermost-server/v5/mlog"
|
||||
)
|
||||
|
||||
type splitLogger struct {
|
||||
wrappedLog *mlog.Logger
|
||||
}
|
||||
|
||||
func (s *splitLogger) Error(msg ...interface{}) {
|
||||
s.wrappedLog.Error(fmt.Sprint(msg...))
|
||||
}
|
||||
|
||||
func (s *splitLogger) Warning(msg ...interface{}) {
|
||||
s.wrappedLog.Warn(fmt.Sprint(msg...))
|
||||
}
|
||||
|
||||
// Ignoring more verbose messages from split
|
||||
func (s *splitLogger) Info(msg ...interface{}) {
|
||||
//s.wrappedLog.Info(fmt.Sprint(msg...))
|
||||
}
|
||||
|
||||
func (s *splitLogger) Debug(msg ...interface{}) {
|
||||
//s.wrappedLog.Debug(fmt.Sprint(msg...))
|
||||
}
|
||||
|
||||
func (s *splitLogger) Verbose(msg ...interface{}) {
|
||||
//s.wrappedLog.Info(fmt.Sprint(msg...))
|
||||
}
|
||||
Ссылка в новой задаче
Block a user