(aws-lambda-nodejs): add log levels for yarn, npm, pnpm #27657
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
Describe the feature
Currently there is an enum
LogLevel
that is defined here. However, this enum is used in numerous places: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 foryarn
andpnpm
, 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
, andesbuild
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
CDK version used
v2.102.0
Environment details (OS name and version, etc.)
Mac OS
The text was updated successfully, but these errors were encountered: