Log executed CLI commands

This commit is contained in:
Vitaliy Filippov
2023-12-06 00:48:12 +03:00
parent 3147c5c8d5
commit 68553eabbb
+1
View File
@@ -116,6 +116,7 @@ func GetConnectionParams(params map[string]string) (map[string]string, error)
func system(program string, args ...string) ([]byte, error)
{
klog.Infof("Running "+program+" "+strings.Join(args, " "))
c := exec.Command(program, args...)
var stdout, stderr bytes.Buffer
c.Stdout, c.Stderr = &stdout, &stderr