Skip to content

(aws-cdk): centralize all cli logging into a single logging function #32039

Closed
@HBobertz

Description

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

  • 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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

effort/mediumMedium work item – several days of effortfeature-requestA feature should be added or improved.p2package/toolsRelated to AWS CDK Tools or CLI

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions