From 9885785a12052c957eb2ef4f51c4a05a92b817ba Mon Sep 17 00:00:00 2001 From: Petr Vobornik Date: Tue, 12 Dec 2023 11:32:53 +0000 Subject: [PATCH] fix: log subscription-manager stdout on error To be able to easier investigate subscription-manager run failures. Signed-off-by: Petr Vobornik --- hostinfo/subscription.go | 1 + 1 file changed, 1 insertion(+) diff --git a/hostinfo/subscription.go b/hostinfo/subscription.go index 3e477bf..240fce7 100644 --- a/hostinfo/subscription.go +++ b/hostinfo/subscription.go @@ -114,6 +114,7 @@ func execSubManCommand(command string) (string, error) { if err != nil { err = fmt.Errorf("`subscription-manager %s` has failed: %s", command, err.Error()) + logger.Debugf("Stdout: %s\n", strings.TrimSpace(stdout.String())) logger.Debugf("Stderr: %s\n", strings.TrimSpace(stderr.String())) logger.Errorf("Error executing subscription manager: %s", err.Error()) return "", err