Skip to content

Commit

Permalink
fix: log subscription-manager stdout on error
Browse files Browse the repository at this point in the history
To be able to easier investigate subscription-manager run failures.

Signed-off-by: Petr Vobornik <[email protected]>
  • Loading branch information
pvoborni committed Dec 12, 2023
1 parent b28045b commit 9885785
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions hostinfo/subscription.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 9885785

Please sign in to comment.