From 87a2e0b2a2d58c19e26d96ebcefc982505316081 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabiano=20Fid=C3=AAncio?= Date: Thu, 17 Jun 2021 12:40:12 +0200 Subject: [PATCH] runtime,v2: Enable debug when containerd is on debug+ log level MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- runtime/v2/binary.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/runtime/v2/binary.go b/runtime/v2/binary.go index 49ecd80e9..571eed296 100644 --- a/runtime/v2/binary.go +++ b/runtime/v2/binary.go @@ -58,7 +58,8 @@ type binary struct { func (b *binary) Start(ctx context.Context, opts *types.Any, onClose func()) (_ *shim, err error) { args := []string{"-id", b.bundle.ID} - if logrus.GetLevel() == logrus.DebugLevel { + switch logrus.GetLevel() { + case logrus.DebugLevel, logrus.TraceLevel: args = append(args, "-debug") } args = append(args, "start")