-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
chore: change logging to use a single base logging method #32081
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.
The pull request linter has failed. See the aws-cdk-automation comment below for failure reasons. If you believe this pull request should receive an exemption, please comment and provide a justification.
A comment requesting an exemption should contain the text Exemption Request
. Additionally, if clarification is needed add Clarification Request
to a comment.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #32081 +/- ##
==========================================
+ Coverage 77.46% 78.19% +0.72%
==========================================
Files 105 105
Lines 7168 7176 +8
Branches 1314 1318 +4
==========================================
+ Hits 5553 5611 +58
+ Misses 1433 1377 -56
- Partials 182 188 +6
Flags with carried forward coverage won't be shown. Click here to find out more.
|
✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.
packages/aws-cdk/lib/cli.ts
Outdated
@@ -49,7 +49,7 @@ export async function exec(args: string[], synthesizer?: Synthesizer): Promise<n | |||
const argv = await parseCommandLineArguments(args, makeBrowserDefault(), await availableInitLanguages(), MIGRATE_SUPPORTED_LANGUAGES as string[], version.DISPLAY_VERSION, yargsNegativeAlias); | |||
|
|||
if (argv.verbose) { | |||
setLogLevel(argv.verbose); | |||
setLogLevelByValue(argv.verbose+2); |
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.
That's unexepected. If intentional it needs a comment why.
@@ -674,8 +674,7 @@ export class CurrentActivityPrinter extends ActivityPrinterBase { | |||
public start() { | |||
// Need to prevent the waiter from printing 'stack not stable' every 5 seconds, it messes | |||
// with the output calculations. | |||
this.oldLogLevel = logLevel; | |||
setLogLevel(LogLevel.DEFAULT); | |||
setLogLevel(LogLevel.INFO); |
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.
okay for now but we will need to get rid of this eventually. setLogLevel
should only every be set once as it affects the output. These messages just need to be logged with the correct level (or not at all).
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.
1 small request. Otherwise the build is not passing.
// if one -v, log at a DEBUG level | ||
// if 2 -v, log at a TRACE level |
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.
What about -vvv
// if one -v, log at a DEBUG level | |
// if 2 -v, log at a TRACE level | |
// if -v, log at a DEBUG level | |
// if -vv, log at a TRACE level |
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). |
Comments on closed issues and PRs are hard for our team to see. |
Closes #32039
Modified the existing logging mechanism to route to a single log function. Adapted the existing structure so that very minimal changes were required for existing logging functions and how they are used today
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license