(aws-cdk): centralize all cli logging into a single logging function
Describe the feature
This file defines our logging tools for the CDK CLI. Refactor the logging implementation into a single logging function which takes both a message and the logging type (info, debug, trace, error, etc...), and then additionally ensure any logging in the package uses this logging function.
Use Case
needed to support future CDK Programmatic Access, but also Centralizes and consolidates logging for the CLI.
Proposed Solution
Probably something like
export type LogLevel = 'error' | 'warn' | 'info' | 'debug' | 'trace';
export interface LogEntry = {
level: LogLevel
message: string
}
export function log(...args: LogEntry[]) {
// do the stuff
}
Other Information
No response
Acknowledgements
- [X] I may be able to implement this feature request
- [ ] This feature might incur a breaking change
CDK version used
2.165
Environment details (OS name and version, etc.)
macOS 15 Sequoia
Worked upon by CDK team.
Comments on closed issues and PRs are hard for our team to see. If you need help, please open a new issue that references this one.
Comments on closed issues and PRs are hard for our team to see. If you need help, please open a new issue that references this one.