Praefect sub-commands: avoid garbage in logs
While running sql-ping
command there is a garbage from other code that runs during initialization of the app like info about connecting to the Sentry or Prometheus.
This is not related to sql-ping
command and should be removed from the output.
praefect -config config.toml sql-ping
{"address":"0.0.0.1","level":"info","msg":"Starting prometheus listener","pid":13922,"time":"2020-01-17T18:53:16+02:00"}
{"error":"listen tcp: address 0.0.0.1: missing port in address","level":"error","msg":"Unable to start healthcheck listener: 0.0.0.1","pid":13922,"time":"2020-01-17T18:53:16+02:00"}
...
The output of each sub-command needs to be related only to execution of this command.
Tracing, Sentry and Prometheus systems do not needed for sql-ping
, sql-migrate
and dial-nodes
sub-commands.
Validation of configuration required only by dial-nodes
sub-commands.
Edited by Pavlo Strokov