You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
When debugging especially filter chains in templates it's often easier if you can just drop a logging filter in between to see the result on the console.
Describe the solution you'd like
Maybe it would be useful to include such a feature like the default log filter (or even an adaption of it) in the default config, which returns the input value.
Describe alternatives you've considered Option 1:
Store the filter chain before the logging in a variable and then use it once for logging and once for the actual work
I think switching the current log filter for the version above might not be compatible, because at the moment the direct binding to console.log allows passing any number of arguments, so it's either a breaking change, or needs to be a new filter.
The text was updated successfully, but these errors were encountered:
It just occured to me, that this is more or less possible in a compatible way by just always passing on the first argument since you can't pass more than one argument from the filter chain anyways and probably noone chained somethign after the current filter, since it always returns undefined right now.
This change makes the `log` filter "passthrough" compatible, so you can put it in the middle of a filter chain.
Signed-off-by: Raphael Höser <raphael@hoeser.info>
Is your feature request related to a problem? Please describe.
When debugging especially filter chains in templates it's often easier if you can just drop a logging filter in between to see the result on the console.
Describe the solution you'd like
Maybe it would be useful to include such a feature like the default log filter (or even an adaption of it) in the default config, which returns the input value.
Describe alternatives you've considered
Option 1:
Store the filter chain before the logging in a variable and then use it once for logging and once for the actual work
Option 2:
I normally add such a filter myself:
Additional context
This would help in cases where you have something like this in a template:
I think switching the current log filter for the version above might not be compatible, because at the moment the direct binding to console.log allows passing any number of arguments, so it's either a breaking change, or needs to be a new filter.
The text was updated successfully, but these errors were encountered: