conf.go 432 B

123456789101112131415161718192021222324
  1. package output
  2. import (
  3. "errors"
  4. "go-common/app/service/ops/log-agent/conf/configcenter"
  5. )
  6. const (
  7. lancerConfig = "output.toml"
  8. )
  9. // ReadConfig read config for default output
  10. func ReadConfig() (value string, err error) {
  11. var ok bool
  12. // logLevel config
  13. if value, ok = configcenter.Client.Value(lancerConfig); !ok {
  14. return "", errors.New("failed to get output.toml")
  15. } else {
  16. return value, nil
  17. }
  18. return value, nil
  19. }