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>
This commit is contained in:
parent
096e99fe7e
commit
87a2e0b2a2
@ -58,7 +58,8 @@ type binary struct {
|
|||||||
|
|
||||||
func (b *binary) Start(ctx context.Context, opts *types.Any, onClose func()) (_ *shim, err error) {
|
func (b *binary) Start(ctx context.Context, opts *types.Any, onClose func()) (_ *shim, err error) {
|
||||||
args := []string{"-id", b.bundle.ID}
|
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, "-debug")
|
||||||
}
|
}
|
||||||
args = append(args, "start")
|
args = append(args, "start")
|
||||||
|
Loading…
Reference in New Issue
Block a user