Skip to content

Commit 31a7e45

Browse files
authored
Merge pull request #1634 from saschagrunert/timeout-log
Log the used connection timeout on debug output
2 parents 9c6a3c8 + 7e505de commit 31a7e45

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

cmd/crictl/main.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,13 +72,14 @@ func getRuntimeService(_ *cli.Context, timeout time.Duration) (res internalapi.R
7272
if RuntimeEndpointIsSet && RuntimeEndpoint == "" {
7373
return nil, errors.New("--runtime-endpoint is not set")
7474
}
75-
logrus.Debug("get runtime connection")
75+
logrus.Debug("Get runtime connection")
7676

7777
// Check if a custom timeout is provided.
7878
t := Timeout
7979
if timeout != 0 {
8080
t = timeout
8181
}
82+
logrus.Debugf("Using runtime connection timeout: %v", t)
8283

8384
// Use the noop tracer provider and not tracerProvider directly, otherwise
8485
// we'll panic in the unary call interceptor
@@ -124,7 +125,7 @@ func getImageService(*cli.Context) (res internalapi.ImageManagerService, err err
124125
ImageEndpointIsSet = RuntimeEndpointIsSet
125126
}
126127

127-
logrus.Debugf("get image connection")
128+
logrus.Debug("Get image connection")
128129

129130
// Use the noop tracer provider and not tracerProvider directly, otherwise
130131
// we'll panic in the unary call interceptor
@@ -137,7 +138,7 @@ func getImageService(*cli.Context) (res internalapi.ImageManagerService, err err
137138

138139
// If no EP set then use the default endpoint types
139140
if !ImageEndpointIsSet {
140-
logrus.Warningf("image connect using default endpoints: %v. "+
141+
logrus.Warningf("Image connect using default endpoints: %v. "+
141142
"As the default settings are now deprecated, you should set the "+
142143
"endpoint instead.", defaultRuntimeEndpoints)
143144
logrus.Debug("Note that performance maybe affected as each default " +

0 commit comments

Comments
 (0)