Skip to content

Commit 87a2e0b

Browse files
committed
runtime,v2: Enable debug when containerd is on debug+ log level
Currently the shimv2 debug is only enabled when containerd is, specifically, on debug mode. However, it should be enabled whenever the CRI runtime is on debug *or any other lower* mode, as in trace mode. Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
1 parent 096e99f commit 87a2e0b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

runtime/v2/binary.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,8 @@ type binary struct {
5858

5959
func (b *binary) Start(ctx context.Context, opts *types.Any, onClose func()) (_ *shim, err error) {
6060
args := []string{"-id", b.bundle.ID}
61-
if logrus.GetLevel() == logrus.DebugLevel {
61+
switch logrus.GetLevel() {
62+
case logrus.DebugLevel, logrus.TraceLevel:
6263
args = append(args, "-debug")
6364
}
6465
args = append(args, "start")

0 commit comments

Comments
 (0)