Skip to content
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

cmd/logcli: add --follow flag as an alias for --tail #4203

Merged
merged 1 commit into from
Aug 23, 2021

Conversation

invidian
Copy link
Contributor

@invidian invidian commented Aug 23, 2021

What this PR does / why we need it:

When using 'logcli query --tail', '--tail' behaves similar to the 'tail'
command, which uses '--follow' flag, if you want to continuously
follow the appended data to the file.

I believe '--follow' flag is more natural for system administrators to
use rather than '--tail' if one wants to "follow" the incoming logs, so
this commit adds one, as an alias for '--tail'.

Which issue(s) this PR fixes:
Fixes #3570

Special notes for your reviewer:

Signed-off-by: Mateusz Gozdek mgozdekof@gmail.com

Checklist

  • Documentation added
  • Tests updated

@invidian invidian requested a review from a team as a code owner August 23, 2021 07:59
@CLAassistant
Copy link

CLAassistant commented Aug 23, 2021

CLA assistant check
All committers have signed the CLA.

Copy link
Contributor

@dannykopping dannykopping left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this, @invidian 👍
I like it

@dannykopping
Copy link
Contributor

@invidian before I merge this, can you please update the documentation?
https://grafana.com/docs/loki/next/getting-started/logcli/#logcli-command-reference

It's in docs/sources/getting-started/logcli.md

When using 'logcli query --tail', '--tail' behaves similar to the 'tail'
command, which uses '--follow' flag, if you want to continuously
follow the appended data to the file.

I believe '--follow' flag is more natural for system administrators to
use rather than '--tail' if one wants to "follow" the incoming logs, so
this commit adds one, as an alias for '--tail'.

Closes grafana#3570

Signed-off-by: Mateusz Gozdek <mgozdekof@gmail.com>
@invidian
Copy link
Contributor Author

@invidian before I merge this, can you please update the documentation?

Sure, done.

@dannykopping
Copy link
Contributor

Many thanks!

@dannykopping dannykopping merged commit b3df9f5 into grafana:main Aug 23, 2021
@invidian invidian deleted the add-follow-flag-to-logcli branch August 23, 2021 12:46
@invidian
Copy link
Contributor Author

Thanks for quick merge :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

logcli query: provider -f/--follow as alias for --tail
3 participants