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

RFC: Add Filtering to the Powertools Logging Feature #497

Open
2 tasks done
amirkaws opened this issue Sep 23, 2023 · 0 comments
Open
2 tasks done

RFC: Add Filtering to the Powertools Logging Feature #497

amirkaws opened this issue Sep 23, 2023 · 0 comments
Labels
area/logging Core logging utility feature-request New or enhancements to existing features RFC Technical design documents related to a feature request
Milestone

Comments

@amirkaws
Copy link
Contributor

Is this related to an existing feature request or issue?

No response

Which Powertools for AWS Lambda (.NET) utility does this relate to?

Logging

Summary

When using Powertools Logger, include filters to include or exclude logs under certain conditions

Use case

Include or exclude log entries under a certain conditions such as

  • Ignore when message contains a text, or
  • Log only when message matches a regular expressions

Proposal

Suggestion

Logger.AddFiter(fiterExpression);
Logger.AddFiters(fiterExpression1, fiterExpression2);

Just a suggestion for filter class

public class LoggerFilterExpression
{
     public LogAction Action { get; set; } // Enum value of Exclude, IncludeOnly, ...
     public string Expression { get; set; } // ex: Contains('Hello'), NotOnly, JMESPath, etc.
}

Out of scope

Anything which is not mentioned in the Summary and Proposal sections.

Potential challenges

TBD

Dependencies and Integrations

No response

Alternative solutions

Extending powertools logger to include the required functionality

Acknowledgment

@amirkaws amirkaws added RFC Technical design documents related to a feature request triage Pending triage from maintainers labels Sep 23, 2023
@hjgraca hjgraca removed the triage Pending triage from maintainers label Oct 11, 2023
@hjgraca hjgraca added this to the Logging V2 milestone Dec 12, 2023
@hjgraca hjgraca added area/logging Core logging utility feature-request New or enhancements to existing features labels Dec 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/logging Core logging utility feature-request New or enhancements to existing features RFC Technical design documents related to a feature request
Projects
Status: No status
Development

No branches or pull requests

2 participants