Add config option for the length of watson log #436
+43
−2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I think the default of showing the past 7 days is rather long and usually I only need to see the last few days to know if I need to use
restart
for a previous entry. I modified the code a few months back to show only the last 3 days on my own installation, but figured I might as well make it a config options so others can use it. This is particularly useful if you have many entries in each day and don't want to have to scroll in your parser every time you run the command and even better if usingless -X -F
which only opens less when the output is longer than the screen height.Personally I don't think there needs to be a new flag added, since there there are already several flags to control the log command from the CLI, just nothing for the default behavior.