introduce follow, deprecate tail
This commit is contained in:
parent
b1d83fe294
commit
9193b03b69
1 changed files with 8 additions and 2 deletions
|
|
@ -16,6 +16,7 @@ func newLogsCmd() *cobra.Command {
|
|||
var (
|
||||
codespace string
|
||||
tail bool
|
||||
follow bool
|
||||
)
|
||||
|
||||
log := output.NewLogger(os.Stdout, os.Stderr, false)
|
||||
|
|
@ -29,12 +30,17 @@ func newLogsCmd() *cobra.Command {
|
|||
log.Println("<codespace> argument is deprecated. Use --codespace instead.")
|
||||
codespace = args[0]
|
||||
}
|
||||
return logs(context.Background(), log, codespace, tail)
|
||||
if tail {
|
||||
log.Println("--tail flag is deprecated. Use --follow instead.")
|
||||
follow = true
|
||||
}
|
||||
return logs(context.Background(), log, codespace, follow)
|
||||
},
|
||||
}
|
||||
|
||||
logsCmd.Flags().StringVarP(&codespace, "codespace", "c", "", "Name of the codespace")
|
||||
logsCmd.Flags().BoolVarP(&tail, "tail", "t", false, "Tail the logs")
|
||||
logsCmd.Flags().BoolVarP(&tail, "tail", "t", false, "Tail the logs (deprecated, use --follow)")
|
||||
logsCmd.Flags().BoolVarP(&follow, "follow", "f", false, "Tail and follow the logs")
|
||||
|
||||
return logsCmd
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue