Skip to content
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

feat(cli): watch streams resources' CloudWatch logs to the terminal #18159

Merged
merged 36 commits into from Jan 12, 2022

Commits on Dec 29, 2021

  1. feat(cli): cdk watch can now stream lambda function logs to the terminal

    This adds a new `--logs` flag on `cdk watch` which is set to false by
    default. When this flag is provided (set to true) watch will fetch any
    CloudWatch Logs log events for any hotswapped Lambda Function starting
    at the time the function was hotswapped.
    
    Once `cdk watch --logs` is run, any Lambda function that is hotswapped
    is added to a list of "monitored" resources. This list is maintained
    through full CloudFormation deployments. So for example if an
    application had 3 Lambda functions, after running `cdk watch --logs`
    none of the functions are monitored by default.
    
    1. Change function code for Function1
    Function1's CloudWatch log group is now being monitored
    2. Change function code for Function2
    Function2's CloudWatch log group is now being monitored
    3. Change a non-hotswappable property which triggers a full
       CloudFormation deployment
    Function1 & Function2 are still being monitored
    
    re #18122
    corymhall committed Dec 29, 2021
    Configuration menu
    Copy the full SHA
    3add949 View commit details
    Browse the repository at this point in the history
  2. simplifying some stuff

    corymhall committed Dec 29, 2021
    Configuration menu
    Copy the full SHA
    151b41d View commit details
    Browse the repository at this point in the history
  3. Apply suggestions from code review

    Co-authored-by: Adam Ruka <adamruka85@gmail.com>
    corymhall and skinny85 committed Dec 29, 2021
    Configuration menu
    Copy the full SHA
    d290fee View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    a13dafb View commit details
    Browse the repository at this point in the history
  5. updates

    corymhall committed Dec 29, 2021
    Configuration menu
    Copy the full SHA
    ad1b4a4 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    18fbefd View commit details
    Browse the repository at this point in the history
  7. pause the logs monitor during a deployment

    updated to use the `print` method that we use elsewhere in the cli
    also switched back to using `setTimeout` instead of `setInterval`
    because `setInterval` sometimes caused events to be processed more than
    once.
    corymhall committed Dec 29, 2021
    Configuration menu
    Copy the full SHA
    5bba356 View commit details
    Browse the repository at this point in the history

Commits on Dec 30, 2021

  1. updates

    corymhall committed Dec 30, 2021
    Configuration menu
    Copy the full SHA
    94fc4c8 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    9e0bef8 View commit details
    Browse the repository at this point in the history
  3. updating readme

    corymhall committed Dec 30, 2021
    Configuration menu
    Copy the full SHA
    809d3d8 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    cb078bf View commit details
    Browse the repository at this point in the history

Commits on Jan 3, 2022

  1. Apply suggestions from code review

    Co-authored-by: Adam Ruka <adamruka85@gmail.com>
    corymhall and skinny85 committed Jan 3, 2022
    Configuration menu
    Copy the full SHA
    2f1d9da View commit details
    Browse the repository at this point in the history
  2. moving things around

    corymhall committed Jan 3, 2022
    Configuration menu
    Copy the full SHA
    a0c8f21 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    2aa585d View commit details
    Browse the repository at this point in the history
  4. renaming addSdk to setSdk

    corymhall committed Jan 3, 2022
    Configuration menu
    Copy the full SHA
    8e0e475 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    5c2af13 View commit details
    Browse the repository at this point in the history
  6. reverting formatting

    corymhall committed Jan 3, 2022
    Configuration menu
    Copy the full SHA
    beb9fc4 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    87afeab View commit details
    Browse the repository at this point in the history

Commits on Jan 4, 2022

  1. Configuration menu
    Copy the full SHA
    0dc861d View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    4329b9c View commit details
    Browse the repository at this point in the history
  3. updates

    corymhall committed Jan 4, 2022
    Configuration menu
    Copy the full SHA
    ca38736 View commit details
    Browse the repository at this point in the history

Commits on Jan 5, 2022

  1. updates

    corymhall committed Jan 5, 2022
    Configuration menu
    Copy the full SHA
    81e6634 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    d718fdb View commit details
    Browse the repository at this point in the history

Commits on Jan 6, 2022

  1. updates

    corymhall committed Jan 6, 2022
    Configuration menu
    Copy the full SHA
    b3ae63c View commit details
    Browse the repository at this point in the history

Commits on Jan 7, 2022

  1. Apply suggestions from code review

    Co-authored-by: Adam Ruka <adamruka85@gmail.com>
    corymhall and skinny85 committed Jan 7, 2022
    Configuration menu
    Copy the full SHA
    200fd60 View commit details
    Browse the repository at this point in the history
  2. updates based on comments

    corymhall committed Jan 7, 2022
    Configuration menu
    Copy the full SHA
    bf6ef3f View commit details
    Browse the repository at this point in the history

Commits on Jan 10, 2022

  1. Configuration menu
    Copy the full SHA
    c38de39 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    3f3547a View commit details
    Browse the repository at this point in the history
  3. Revert "using lookup role for reading cloudwatch logs"

    This reverts commit 3f3547a.
    corymhall committed Jan 10, 2022
    Configuration menu
    Copy the full SHA
    5043f4a View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    965f963 View commit details
    Browse the repository at this point in the history

Commits on Jan 11, 2022

  1. Configuration menu
    Copy the full SHA
    e46e971 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    4369e08 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    15f3e91 View commit details
    Browse the repository at this point in the history

Commits on Jan 12, 2022

  1. refactoring findCloudWatchLogGroups to lookup the list of CloudWatch

    log groups from the deployed template rather than by parsing the current
    template
    corymhall committed Jan 12, 2022
    Configuration menu
    Copy the full SHA
    2c07e8f View commit details
    Browse the repository at this point in the history
  2. fixing urlSuffix

    corymhall committed Jan 12, 2022
    Configuration menu
    Copy the full SHA
    87d8d9d View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    d875b92 View commit details
    Browse the repository at this point in the history