Skip to content

Commit

Permalink
Merge pull request #124 from movio/movio-tweaks
Browse files Browse the repository at this point in the history
Small changes for Movio
  • Loading branch information
pkqk authored Feb 17, 2022
2 parents 4e01309 + 6b2fb5d commit 13ff3d5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
12 changes: 6 additions & 6 deletions execution.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,7 @@ func (s *ExecutableSchema) UpdateSchema(forceRebuild bool) error {
promServiceUpdateError.Reset()

for url, s := range s.Services {
logger := log.WithFields(log.Fields{
"url": url,
"version": s.Version,
"service": s.Name,
})
logger := log.WithField("url", url)
updated, err := s.Update()
if err != nil {
promServiceUpdateError.WithLabelValues(s.ServiceURL).Inc()
Expand All @@ -95,9 +91,13 @@ func (s *ExecutableSchema) UpdateSchema(forceRebuild bool) error {
// Ignore this service in this update
continue
}
logger = log.WithFields(log.Fields{
"version": s.Version,
"service": s.Name,
})

if updated {
logger.Info("service was upgraded")
logger.Info("service was updated")
updatedServices = append(updatedServices, s.Name)
}

Expand Down
3 changes: 2 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ import (
// when building Bramble with custom plugins.
func Main() {
var configFiles arrayFlags
flag.Var(&configFiles, "conf", "Config file (can appear multiple times)")
flag.Var(&configFiles, "config", "Config file (can appear multiple times)")
flag.Var(&configFiles, "conf", "deprecated, use -config instead")
flag.Parse()

log.SetFormatter(&log.JSONFormatter{TimestampFormat: time.RFC3339Nano})
Expand Down

0 comments on commit 13ff3d5

Please sign in to comment.