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

Feature request: change visibility from private to protected to allow overrides #3376

Closed
1 of 2 tasks
zirkelc opened this issue Nov 27, 2024 · 3 comments · Fixed by #3377
Closed
1 of 2 tasks

Feature request: change visibility from private to protected to allow overrides #3376

zirkelc opened this issue Nov 27, 2024 · 3 comments · Fixed by #3377
Assignees
Labels
completed This item is complete and has been merged/shipped feature-request This item refers to a feature request for an existing or new utility logger This item relates to the Logger Utility

Comments

@zirkelc
Copy link
Contributor

zirkelc commented Nov 27, 2024

Use case

As discussed before, I would like to suggest to change the visibility of certain methods of Logger from private to protected to allow overrides by subclassing Logger. A use case for such an override would be the buffering of log messages (see #3178).

If approved, I'm happy to submit a PR.

Solution/User Experience

The following methods could be made protected:

private createAndPopulateLogItem(
logLevel: number,
input: LogItemMessage,
extraInput: LogItemExtraInput
): LogItem {

private printLog(logLevel: number, log: LogItem): void {

private processLogItem(
logLevel: number,
input: LogItemMessage,
extraInput: LogItemExtraInput
): void {

Alternative solutions

Acknowledgment

Future readers

Please react with 👍 and your use case to help us understand customer demand.

@zirkelc zirkelc added feature-request This item refers to a feature request for an existing or new utility triage This item has not been triaged by a maintainer, please wait labels Nov 27, 2024
@dreamorosi dreamorosi added logger This item relates to the Logger Utility confirmed The scope is clear, ready for implementation and removed triage This item has not been triaged by a maintainer, please wait labels Nov 27, 2024
@dreamorosi dreamorosi moved this from Triage to Backlog in Powertools for AWS Lambda (TypeScript) Nov 27, 2024
@dreamorosi
Copy link
Contributor

Hi @zirkelc, the proposal makes sense.

We discussed this in #3178, so feel free to open a PR to make these changes and I'll help you get it merged before the next release!

Copy link
Contributor

⚠️ COMMENT VISIBILITY WARNING ⚠️

This issue is now closed. Please be mindful that future comments are hard for our team to see.

If you need more assistance, please either tag a team member or open a new issue that references this one.

If you wish to keep having a conversation with other community members under this issue feel free to do so.

@github-actions github-actions bot added pending-release This item has been merged and will be released soon and removed confirmed The scope is clear, ready for implementation labels Nov 29, 2024
Copy link
Contributor

This is now released under v2.12.0 version!

@github-actions github-actions bot added completed This item is complete and has been merged/shipped and removed pending-release This item has been merged and will be released soon labels Dec 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
completed This item is complete and has been merged/shipped feature-request This item refers to a feature request for an existing or new utility logger This item relates to the Logger Utility
Projects
Status: Coming soon
Development

Successfully merging a pull request may close this issue.

2 participants