Skip to content
This repository has been archived by the owner on Feb 15, 2023. It is now read-only.

(trivial) fix error message on config #11

Merged
merged 1 commit into from
Nov 10, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions cmd/goflow-kube.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,10 @@ func main() {
log.Infof("Starting %s at log level %s", appVersion, *logLevel)

cfg := loadMainConfig()
log.Info("Creating loki...")
log.Info("Creating loki exporter...")
loki, err := export.NewLoki(&cfg.Loki)
if err != nil {
log.WithError(err).Fatal("Can't load Loki exporter")
log.WithError(err).Fatal("Can't create Loki exporter")
}

var in format.Format
Expand Down Expand Up @@ -138,10 +138,10 @@ func loadMainConfig() *config.Config {
var err error
if mainConfigPath != nil && *mainConfigPath != "" {
flog := log.WithField("configFile", *mainConfigPath)
flog.Info("Using command line supplied loki config")
flog.Info("Using command line supplied config")
cfg, err = config.Load(*mainConfigPath)
if err != nil {
flog.WithError(err).Fatal("Can't load loki config file")
flog.WithError(err).Fatal("Can't load config file")
}
} else if lfgPath := os.Getenv("CONFIG"); lfgPath != "" {
log.Info("Using environment CONFIG")
Expand Down