We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e77315d commit 1408ccbCopy full SHA for 1408ccb
1 file changed
pkg/infra/consul.go
@@ -32,8 +32,21 @@ func GetConsulClient(environment string) *api.Client {
32
33
config.Address = viper.GetString("consul.address")
34
config.WaitTime = 10 * time.Second
35
- // Ping the Consul server to verify connectivity
36
+ tokenLength := 0
37
+ if config.Token != "" {
38
+ tokenLength = len(config.Token)
39
+ }
40
+
41
+ logger.Info("Consul config",
42
+ "environment", environment,
43
+ "address", config.Address,
44
+ "wait_time", config.WaitTime,
45
+ "token_length", tokenLength,
46
+ "http_auth", config.HttpAuth,
47
+ )
48
49
+ // Ping the Consul server to verify connectivity
50
client, err := api.NewClient(config)
51
if err != nil {
52
logger.Fatal("Failed to create consul client", err)
0 commit comments