mirror of
https://github.com/giongto35/cloud-game.git
synced 2026-01-23 02:34:42 +00:00
Embed config.yaml into both apps
This commit is contained in:
parent
9231120a55
commit
b227260060
11 changed files with 31 additions and 21 deletions
|
|
@ -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)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue