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]: Customizable Logger Filters for StackedLogger #1098

Open
camillo-rinaldi opened this issue Apr 19, 2024 · 1 comment
Open

[feature]: Customizable Logger Filters for StackedLogger #1098

camillo-rinaldi opened this issue Apr 19, 2024 · 1 comment
Labels
Improvement An issue to improve existing functionality

Comments

@camillo-rinaldi
Copy link

Is your feature request related to a problem? Please describe.

The problem arises when trying to control log output in different environments using the StackedLogger class. Currently, there is no straightforward way to specify which logs are displayed in production versus development environments.

Describe the solution you would like

I propose adding functionality to the StackedLogger class that allows developers to specify a default log filter directly through the @StackedApp annotation. This would involve enhancing the logger setup to accept a filter parameter that determines which log messages are appropriate for different build variants or environments. For example:

@StackedApp(
  logger: StackedLogger(
    filter: MyCustomFilter(),
  ),
)

Additional Context

No response

@FilledStacks FilledStacks added Improvement An issue to improve existing functionality new feature Requires planning and detailed comments of what will be done to build this and removed new feature Requires planning and detailed comments of what will be done to build this labels Apr 25, 2024
@FilledStacks
Copy link
Contributor

This is a good improvement request.

We currently only have disableReleaseConsoleOutput: property on the logger, which will disable logs in release mode, but only to console output.

If you have a custom logger you're passing in you can internally determine what to log as a workaround.

But I agree, this should be easier.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Improvement An issue to improve existing functionality
Projects
None yet
Development

No branches or pull requests

2 participants