[feature]: Customizable Logger Filters for StackedLogger
Opened this issue · 1 comments
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
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.