bilibili-backup/app/service/ops/log-agent/output/conf.go
2019-04-22 02:59:20 +00:00

25 lines
432 B
Go

package output
import (
"errors"
"go-common/app/service/ops/log-agent/conf/configcenter"
)
const (
lancerConfig = "output.toml"
)
// ReadConfig read config for default output
func ReadConfig() (value string, err error) {
var ok bool
// logLevel config
if value, ok = configcenter.Client.Value(lancerConfig); !ok {
return "", errors.New("failed to get output.toml")
} else {
return value, nil
}
return value, nil
}