Skip to content

Commit

Permalink
refactor fatals
Browse files Browse the repository at this point in the history
  • Loading branch information
FZambia committed Dec 24, 2024
1 parent 1997a9d commit 0787351
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions internal/app/mux.go
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,8 @@ func getPingPongConfig(cfg config.Config) centrifuge.PingPongConfig {
pingInterval := cfg.Client.PingInterval
pongTimeout := cfg.Client.PongTimeout
if pingInterval <= pongTimeout {
log.Fatal().Msgf("ping_interval (%s) must be greater than pong_timeout (%s)", pingInterval, pongTimeout)
log.Fatal().Str("ping_interval", pingInterval.String()).Str("pong_timeout", pongTimeout.String()).
Msg("ping_interval must be greater than pong_timeout")
}
return centrifuge.PingPongConfig{
PingInterval: pingInterval.ToDuration(),
Expand Down Expand Up @@ -510,10 +511,10 @@ func runHTTPServers(
go func() {
if useHTTP3 {
if addrTLSConfig == nil {
log.Fatal().Msgf("HTTP/3 requires TLS configured")
log.Fatal().Msg("HTTP/3 requires TLS configured")
}
if cfg.TLSAutocert.Enabled {
log.Fatal().Msgf("can not use HTTP/3 with autocert")
log.Fatal().Msg("can not use HTTP/3 with autocert")
}

udpAddr, err := net.ResolveUDPAddr("udp", addr)
Expand Down
2 changes: 1 addition & 1 deletion internal/app/proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ func buildProxyMap(cfg config.Config) (*client.ProxyMap, bool, error) {
}
}
if strings.HasPrefix(p.Endpoint, "http") {
log.Fatal().Msgf("error creating subscribe stream proxy %s only GRPC endpoints supported", "default")
log.Fatal().Str("name", subscribeStreamProxyName).Msg("error creating subscribe stream proxy only GRPC endpoints supported")
}
if _, ok := proxyMap.SubscribeStreamProxies[subscribeStreamProxyName]; !ok {
sp, err := proxy.NewSubscribeStreamProxy(subscribeStreamProxyName, p)
Expand Down

0 comments on commit 0787351

Please sign in to comment.