-
Notifications
You must be signed in to change notification settings - Fork 14
feat: adds option to tail logs #278
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Signed-off-by: ChrisJBurns <[email protected]>
Signed-off-by: ChrisJBurns <[email protected]>
Signed-off-by: ChrisJBurns <[email protected]>
Signed-off-by: ChrisJBurns <[email protected]>
Signed-off-by: ChrisJBurns <[email protected]>
Signed-off-by: ChrisJBurns <[email protected]>
}, | ||
} | ||
|
||
logsCommand.Flags().BoolVarP(&tailFlag, "tail", "t", false, "Tail the logs") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we make this an IntVarP and pass the 100
that's the default?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if we can make 100
the default here as that would mean it always tails 100
lines. We need a flag that allows users to tail or just output. However, I can add another variable that is an IntVarP
that defaults to 100
and instead outputs the last 100 lines OR it will only tail the last 100 lines.
Description
Previous to this PR, there was no way of tailing the logs, you had to continually run
thv logs $SERVER_NAME
to get the logs. Now, with the addition of the-t
flag tothv logs $SERVER_NAME
we can tail the last 100 log lines. If we want to make the100
configurable, we can, thought I'd set a sensible default for now.Changes
-t
tail flag to the logs subcommandRunE
so we can return errors from the subcommands up to the mainRef: #202