Skip to content

Commit a8a6744

Browse files
authored
Add support for streaming hosted agent build logs (#568)
* re-add log-type to support build logs * use log-type to follow flag naming convention
1 parent 398aac2 commit a8a6744

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

cmd/lk/agent.go

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,13 @@ var (
8080
Required: false,
8181
}
8282

83+
logTypeFlag = &cli.StringFlag{
84+
Name: "log-type",
85+
Usage: "Type of logs to retrieve. Valid values are 'deploy' and 'build'",
86+
Value: "deploy",
87+
Required: false,
88+
}
89+
8390
AgentCommands = []*cli.Command{
8491
{
8592
Name: "agent",
@@ -176,6 +183,7 @@ var (
176183
Action: getLogs,
177184
Flags: []cli.Flag{
178185
nameFlag(false),
186+
logTypeFlag,
179187
tomlFlag,
180188
},
181189
ArgsUsage: "[working-dir]",
@@ -705,7 +713,7 @@ func getLogs(ctx context.Context, cmd *cli.Command) error {
705713
if err != nil {
706714
return err
707715
}
708-
err = agentfs.LogHelper(ctx, "", agentName, cmd.String("log_type"), project)
716+
err = agentfs.LogHelper(ctx, "", agentName, cmd.String("log-type"), project)
709717
return err
710718
}
711719

0 commit comments

Comments
 (0)