You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's frustrating to see surrounding events when you find something of interest in the log.
cw tail my-log-group -b7d | grep ERROR
> 2021-10-04T09:20:02,747 <ERROR><45c352fb-63c8-473c-93f0-14d1cf34a879> ERROR for some reason
# Inconvenient part, constructing the surrounding timestamps
cw tail my-log-group --start="2021-10-04T09:19:00" --end="2021-10-04T09:21:00"
Proposal
Provide an additional parameter -l, --relative-to="<Full DATE/DATETIME>" to the cw tail function, that can be used in conjunction to the relative parameters for -b, -e. Example:
Hi @Kantis
Thank you for your suggestion.
I can see what you want to achieve, and I believe you can achieve it with grepA and B options:
i.e. cw tail my-log-group -b7d | grep ERROR -A 2 -B 2 will give you 2 lines before and after the grep hit.
Problem
It's frustrating to see surrounding events when you find something of interest in the log.
Proposal
Provide an additional parameter
-l, --relative-to="<Full DATE/DATETIME>"
to thecw tail
function, that can be used in conjunction to the relative parameters for-b, -e
. Example:cw tail my-log-group -l "2021-10-04T09:19:00" -b1m -e1m
Also it could be nice if -b and -e supported down to millisecond precision? Perhaps worthy of a separate ticket..
Alternatives
I considered whether the before/after should be merged into a single additional parameter, but I think it's more natural this way..
The text was updated successfully, but these errors were encountered: