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

add quiet flag #139

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

add quiet flag #139

wants to merge 2 commits into from

Conversation

SijanC147
Copy link

This is in relation to #138.

Unfortunately, for what it's worth, it's still not possible to "pipe" the output to another process, since the last command uses process substitution, and I couldn't figure out how to achieve this with my limited knowledge of shell, other than replacing the last line in my own fork with:

lnav <( eval "${command_to_tail}" )

but, the quiet flag does what it's suppose to, so i figured i'd make the PR anyway :)

good job on this project man, keep it up 👏

@johanhaleby
Copy link
Owner

Thank you for the PR, but what is lnav? :) Is this something that is as ubiquitously available as tail?

@SijanC147
Copy link
Author

it is a terminal based log viewer with a bevy of features. stuff like querying logs with sql, generating historgrams, custom formats, etc... :)

@johanhaleby
Copy link
Owner

Well, if it still doesn't work with piping, why not play it safe and retain the use of tail -f?

@SijanC147
Copy link
Author

i'm not sure but i think it's not that it doesn't work with piping because i typically pipe kubectl to it, but because the final command in kubetail uses a subshell process tail doesn't output anything to stdout, so lnav doesn't receive anything from the pipe. but regardless, the approach in my fork worked well, but obviously that's just for my own use case, so i kept it separate.

I also tried to use the buffered option, but couldn't get it to work for some reason and didn't have enough time to play around with it 😅

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

Successfully merging this pull request may close these issues.

None yet

2 participants