tilt icon indicating copy to clipboard operation
tilt copied to clipboard

Tilt logs should have options for only displaying the latest logs

Open NickWemekamp opened this issue 3 years ago • 2 comments

Describe the Feature You Want

Tilt logs should have command line options for only displaying the last N lines of all the logs and/or an option to only print the logging after a user specified time (e.g. show me the logs from the last N seconds and follow the logs after that). It might even be a default when executing tilt logs so that when you execute tilt logs it only displays the latest logging and tilt logs --all displays all the logging.

Current Behavior

There is no such option and tilt logs displays all the logging. Which can be noisy and fill the CMD prompt with irrelevant logging output.

Why Do You Want This?

Tilt resources can have a lot of start up logging that are not relevant for developers, for example Maven download logging. Also most of the time you only want to look at the latest logs anyway for example when you are debugging/reproducing a bug.

NickWemekamp avatar Apr 21 '22 08:04 NickWemekamp

@NickWemekamp have you considered doing something like:

tilt logs | tail

?

i guess i wouldn't be opposed to adding tilt logs --tail. But it feels like there's a lot of log-viewing tools already in the world... I don't think we really want tilt to contain an adhoc poorly-specified implementation of tail or stern

nicks avatar Apr 25 '22 20:04 nicks

Yes I have but I have to use windows unfortunately.

I see where you're coming from and I can always follow the instructions here to get tail to work in windows https://stackoverflow.com/questions/187587/a-windows-equivalent-of-the-unix-tail-command but it's a bit of a hassle if every developer/tester has to install this. Something small and included in the tilt binary would be more convenient, I think.

It looks like Garden has something similar https://docs.garden.io/using-garden/using-the-cli#logs

NickWemekamp avatar Apr 26 '22 11:04 NickWemekamp