Skip to content

Commit b641d2d

Browse files
committed
hostagent: propagate --debug
Signed-off-by: Akihiro Suda <[email protected]>
1 parent decf726 commit b641d2d

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

pkg/start/start.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,16 @@ func Start(ctx context.Context, inst *store.Instance) error {
7272
}
7373
// no defer haStderrW.Close()
7474

75-
haCmd := exec.CommandContext(ctx, self,
75+
var args []string
76+
if logrus.GetLevel() >= logrus.DebugLevel {
77+
args = append(args, "--debug")
78+
}
79+
args = append(args,
7680
"hostagent",
7781
"--pidfile", haPIDPath,
7882
inst.Name)
83+
haCmd := exec.CommandContext(ctx, self, args...)
84+
7985
haCmd.Stdout = haStdoutW
8086
haCmd.Stderr = haStderrW
8187

0 commit comments

Comments
 (0)