diff options
author | Pavlo Strokov <pstrokov@gitlab.com> | 2021-11-02 17:30:31 +0300 |
---|---|---|
committer | Toon Claes <toon@gitlab.com> | 2021-11-12 17:34:13 +0300 |
commit | 97324e91b2a5cc879532ac9e82f6a14a9a18d966 (patch) | |
tree | 438cd9c0e5913c6af2690b0f4dee23383503dcd8 /cmd | |
parent | 9e1a05c6e8c33e39a60fee334ca6a384b6c25a29 (diff) |
praefect: Log listening message in proper place
The Praefect printed log message about listening addresses
too far from the actual point when it starts to listen on
them. This change moves the log message to the proper place.
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/praefect/main.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/cmd/praefect/main.go b/cmd/praefect/main.go index ed8333b1a..5d3474999 100644 --- a/cmd/praefect/main.go +++ b/cmd/praefect/main.go @@ -431,6 +431,9 @@ func run(cfgs []starter.Config, conf config.Config, b bootstrap.Listener, promre if err := b.Start(); err != nil { return fmt.Errorf("unable to start the bootstrap: %v", err) } + for _, cfg := range cfgs { + logger.WithFields(logrus.Fields{"schema": cfg.Name, "address": cfg.Addr}).Info("listening") + } go repl.ProcessBacklog(ctx, praefect.ExpBackoffFactory{Start: time.Second, Max: 5 * time.Second}) logger.Info("background started: processing of the replication events") @@ -507,8 +510,6 @@ func getStarterConfigs(conf config.Config) ([]starter.Config, error) { unique[addrConf.Addr] = struct{}{} cfgs = append(cfgs, addrConf) - - logger.WithFields(logrus.Fields{"schema": schema, "address": addr}).Info("listening") } if len(cfgs) == 0 { |