nanobox icon indicating copy to clipboard operation
nanobox copied to clipboard

Enhance log fetching

Open glinton opened this issue 8 years ago • 3 comments
trafficstars

Utilize logvac's time filtering (start, stop, limit) in the cli.

Usage might look something like this:

# get a date range
nanobox log --start="Mon Aug 28 23:05:30 2017" --stop="Mon Aug 29 03:05:30 2017"

# get 30 minutes of logs starting at date/time
nanobox log --start="Mon Aug 28 23:05:30 2017" --limit="30m"

# get 3000 log lines starting at date/time
nanobox log --start="Mon Aug 28 23:05:30 2017" --limit="3000"

glinton avatar Aug 29 '17 15:08 glinton

Does logvac support filtering by component and/or logger ID? These values are displayed, so they're definitely stored, but they might not be exposed for filtering against. It would be really useful to be able to say nanobox log -n 20 -f --component="data.db" --logger="cron*" to get the last 20 cronjob outputs on data.db, and continue streaming any new ones that pop up (as one example).

danhunsaker avatar Aug 29 '17 16:08 danhunsaker

Logvac exposes much for filtering, so yes for historic. I'm fairly sure that level of filtering can also work for streaming as well, but would have to double check.

glinton avatar Aug 29 '17 19:08 glinton

Also, print 10 lines by default with -f so we can see that it's doing something

glinton avatar Aug 29 '17 20:08 glinton