Embed config.yaml into both apps

This commit is contained in:
Sergey Stepanov 2023-04-25 20:53:06 +03:00 committed by sergystepanov
parent 9231120a55
commit b227260060
11 changed files with 31 additions and 21 deletions

View file

@ -10,12 +10,12 @@ import (
var Version = "?"
func main() {
conf := config.NewCoordinatorConfig()
conf, paths := config.NewCoordinatorConfig()
conf.ParseFlags()
log := logger.NewConsole(conf.Coordinator.Debug, "c", false)
log.Info().Msgf("version %s", Version)
log.Info().Msgf("conf: v%v", conf.Version)
log.Info().Msgf("conf: v%v, loaded: %v", conf.Version, paths)
if log.GetLevel() < logger.InfoLevel {
log.Debug().Msgf("conf: %+v", conf)
}

View file

@ -13,12 +13,12 @@ import (
var Version = "?"
func run() {
conf := config.NewWorkerConfig()
conf, paths := config.NewWorkerConfig()
conf.ParseFlags()
log := logger.NewConsole(conf.Worker.Debug, "w", false)
log.Info().Msgf("version %s", Version)
log.Info().Msgf("conf: v%v", conf.Version)
log.Info().Msgf("conf: v%v, loaded: %v", conf.Version, paths)
if log.GetLevel() < logger.InfoLevel {
log.Debug().Msgf("conf: %+v", conf)
}