mtools icon indicating copy to clipboard operation
mtools copied to clipboard

[mlogfilter] Add filter to output from last (n) restart(s)

Open gianpaj opened this issue 11 years ago • 4 comments

If no restart (or start) message found, return a warning or error

gianpaj avatar Jun 26 '13 13:06 gianpaj

Oops, fat-fingered. It's not closed. :)

rueckstiess avatar Jul 17 '13 04:07 rueckstiess

This has now become easier, with the LogFile class offering all restarts of a log file.

Proposed syntax "restart" keyword for --from / --to

mlogfilter logfile.log --from restart 

The usual modifier rules apply, so this should also be possible

mlogfilter logfile.log --from "restart -1h" 

rueckstiess avatar Sep 09 '13 22:09 rueckstiess

This would be pretty useful. I did a bash script for this some time ago: https://github.com/gianpaj/mongo-scripts/blob/master/rlogtail.sh

Most of the times I found that tailing from the bottom was quicker

gianpaj avatar Sep 10 '13 11:09 gianpaj

Updated title: Add filter to output from last (n) restart(s)

gianpaj avatar Jan 20 '14 16:01 gianpaj