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

(aws-lambda-nodejs): add log levels for yarn, npm, pnpm #27657

Open
1 of 2 tasks
msambol opened this issue Oct 24, 2023 · 1 comment
Open
1 of 2 tasks

(aws-lambda-nodejs): add log levels for yarn, npm, pnpm #27657

msambol opened this issue Oct 24, 2023 · 1 comment
Assignees
Labels
@aws-cdk/aws-lambda-nodejs effort/medium Medium work item – several days of effort feature-request A feature should be added or improved. p2

Comments

@msambol
Copy link
Contributor

msambol commented Oct 24, 2023

Describe the feature

Currently there is an enum LogLevel that is defined here. However, this enum is used in numerous places:

  1. yarn
  2. pnpm
  3. npm
  4. esbuild

I believe the enum was original intended for use by esbuild, but it's being used in all four places now. If you look at the code for yarn and pnpm, it doesn't really use the log level at all. Also, the four do not share the same log levels (per their doc), although they are similar. I'd like to extend this package by adding more granularity in log level.

Use Case

yarn, pnpm, npm, and esbuild share a log level. More granularity should be offered.

Proposed Solution

Add additional enums and maybe a "clamper." Per @indrora in #27634: "I could easily see the enum having all these levels but a helper function that "clamps" it at a maximum level (since one tool doesn't know VERBOSE, it would be clamped somehow)."

Other Information

Related to #27634.

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

CDK version used

v2.102.0

Environment details (OS name and version, etc.)

Mac OS

@msambol msambol added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Oct 24, 2023
@msambol
Copy link
Contributor Author

msambol commented Oct 24, 2023

I will implement this feature after discussion internally amongst CDK members.

@msambol msambol changed the title (aws-lambda-nodejs): (aws-lambda-nodejs): add log levels for yarn, npm, pnpm Oct 24, 2023
@pahud pahud added p2 effort/medium Medium work item – several days of effort and removed needs-triage This issue or PR still needs to be triaged. labels Oct 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-lambda-nodejs effort/medium Medium work item – several days of effort feature-request A feature should be added or improved. p2
Projects
None yet
Development

No branches or pull requests

3 participants