fixed final issues

fixed format strings for slog
This commit is contained in:
miampf 2024-01-15 14:22:01 +01:00
parent 69556e84d9
commit 941889ade7
No known key found for this signature in database
GPG key ID: 376EAC0E5307A669
58 changed files with 191 additions and 2210 deletions

View file

@ -9,6 +9,7 @@ package grpclog
import (
"context"
"fmt"
"sync"
"google.golang.org/grpc/connectivity"
@ -30,15 +31,15 @@ func LogStateChangesUntilReady(ctx context.Context, conn getStater, log debugLog
go func() {
defer wg.Done()
state := conn.GetState()
log.Debug("Connection state started as %s", state)
log.Debug(fmt.Sprintf("Connection state started as %s", state))
for ; state != connectivity.Ready && conn.WaitForStateChange(ctx, state); state = conn.GetState() {
log.Debug("Connection state changed to %s", state)
log.Debug(fmt.Sprintf("Connection state changed to %s", state))
}
if state == connectivity.Ready {
log.Debug("Connection ready")
isReadyCallback()
} else {
log.Debug("Connection state ended with %s", state)
log.Debug(fmt.Sprintf("Connection state ended with %s", state))
}
}()
}