allow LOG_STREAM_PREFIX to be empty for aws_logs
This commit is contained in:
parent
af321981a5
commit
664c0667de
1 changed files with 9 additions and 1 deletions
|
@ -51,7 +51,15 @@ aws_logs() {
|
||||||
LOG_STREAM_PREFIX="$(aws logs describe-log-streams --log-group-name "$LOG_GROUP" | jq -r '.logStreams | .[] | .logStreamName' | fzf -1 --print-query | head -n 1)"
|
LOG_STREAM_PREFIX="$(aws logs describe-log-streams --log-group-name "$LOG_GROUP" | jq -r '.logStreams | .[] | .logStreamName' | fzf -1 --print-query | head -n 1)"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
aws logs tail "${LOG_GROUP}" --log-stream-name-prefix "$LOG_STREAM_PREFIX" "$@"
|
if [ -n "$LOG_STREAM_PREFIX" ]; then
|
||||||
|
aws logs tail "${LOG_GROUP}" \
|
||||||
|
--log-stream-name-prefix "$LOG_STREAM_PREFIX" \
|
||||||
|
"$@"
|
||||||
|
|
||||||
|
exit $?
|
||||||
|
fi
|
||||||
|
|
||||||
|
aws logs tail "${LOG_GROUP}" "$@"
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue