Skip to content

Commit

Permalink
Merge pull request #52 from nyaruka/inc_build_version
Browse files Browse the repository at this point in the history
Log app version on startup
  • Loading branch information
rowanseymour authored Jun 27, 2022
2 parents 3a25a43 + 4b923c7 commit 9b707dd
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions cmd/rp-indexer/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,19 @@ import (
log "github.com/sirupsen/logrus"
)

var (
// https://goreleaser.com/cookbooks/using-main.version
version = "dev"
date = "unknown"
)

func main() {
cfg := indexer.NewDefaultConfig()
loader := ezconf.NewLoader(cfg, "indexer", "Indexes RapidPro contacts to ElasticSearch", []string{"indexer.toml"})
loader.MustLoad()

log.WithField("version", version).WithField("released", date).Info("starting indexer")

// configure our logger
log.SetOutput(os.Stdout)
log.SetFormatter(&log.TextFormatter{})
Expand Down

0 comments on commit 9b707dd

Please sign in to comment.