-
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
fix(cli): sdk logging is always present even when not turned on #33324
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(This review is outdated)
61f1ffc
to
daeea3a
Compare
➡️ PR build request submitted to A maintainer must now check the pipeline and add the |
@@ -87,7 +87,7 @@ export class SdkToCliLogger implements Logger { | |||
* ``` | |||
*/ | |||
public error(...content: any[]) { | |||
this.notify('info', ...content); | |||
this.notify('error', ...content); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this was also wrong!
expect(ioHost.notify).toHaveBeenCalled(); | ||
logger[method]('SDK Logger test message'); | ||
expect(ioHost.notify).toHaveBeenCalledWith(expect.objectContaining({ | ||
level: 'trace', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
explicitly expect the the level to be trace
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #33324 +/- ##
=======================================
Coverage 80.83% 80.83%
=======================================
Files 236 236
Lines 14253 14253
Branches 2490 2490
=======================================
Hits 11522 11522
Misses 2446 2446
Partials 285 285
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Skipping |
✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
This pull request has been removed from the queue for the following reason: Pull request #33324 has been dequeued, merge conditions unmatch:
You should look at the reason for the failure and decide if the pull request needs to be fixed or if you want to requeue it. If you want to requeue this pull request, you need to post a comment with the text: |
@mergify refresh |
✅ Pull request refreshed |
Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
This pull request has been removed from the queue for the following reason: Pull request #33324 has been dequeued, merge conditions unmatch:
You should look at the reason for the failure and decide if the pull request needs to be fixed or if you want to requeue it. If you want to requeue this pull request, you need to post a comment with the text: |
@Mergifyio queue priority-squash |
🛑 The pull request has been removed from the queue
|
@Mergifyio requeue |
✅ The queue state of this pull request has been cleaned. It can be re-embarked automatically |
@Mergifyio refresh |
✅ Pull request refreshed |
Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
Comments on closed issues and PRs are hard for our team to see. |
Issue #33320
Closes #33320
Reason for this change
In #33273 we introduced a bug that causes SDK logs to always be printed.
Description of changes
Set the correct log level for SDK logs.
Describe any new or updated permissions being added
n/a
Description of how you validated changes
Manual test and updated unit test
Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license