-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(CLI): watch
logs always end with the 'truncated' message
#18805
Comments
It looks like as long as there are any events in the log group it will always return a |
watch
logs always end wit the truncated messagewatch
logs always end with the truncated message
watch
logs always end with the truncated messagewatch
logs always end with the 'truncated' message
CloudWatchLogs.filterLogEvents will always return a `nextToken` as long as there are _any_ additional logs. This is regardless of any filter used (i.e. `startTime`). This PR updates the logic to only display the truncated message if `CloudWatchLogs.filterLogEvents` returns 100 events (the `limit`) _and_ the `nextToken`. If the limit is hit and there is a `nextToken` then we can assume that the _current_ request for log events was truncated. fixes #18805 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
|
…9241) CloudWatchLogs.filterLogEvents will always return a `nextToken` as long as there are _any_ additional logs. This is regardless of any filter used (i.e. `startTime`). This PR updates the logic to only display the truncated message if `CloudWatchLogs.filterLogEvents` returns 100 events (the `limit`) _and_ the `nextToken`. If the limit is hit and there is a `nextToken` then we can assume that the _current_ request for log events was truncated. fixes aws#18805 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
What is the problem?
When using
cdk watch
, the logs always end with:Before that, the logs show only 5 messages, so the limit of 100 was definitely not hit.
Reproduction Steps
My CDK app is super basic:
What did you expect to happen?
Logs would be shown nicely.
What actually happened?
The logs always end with:
CDK CLI Version
v1.143.0
Framework Version
v1.143.0
Node.js Version
v16.13.1
OS
MacOS
Language
Typescript
Language Version
3.9.7
Other information
No response
The text was updated successfully, but these errors were encountered: