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
new filter template function, and fix if inside map #3426
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
furiel
changed the title
new filter template function, and fix
new filter template function, and fix if inside map
Sep 11, 2020
if
inside map
Build SUCCESS |
Kokan
reviewed
Sep 15, 2020
furiel
changed the title
new filter template function, and fix if inside map
[WIP] new filter template function, and fix if inside map
Sep 17, 2020
furiel
force-pushed
the
filter-function
branch
from
September 18, 2020 09:25
a536ec4
to
2b5913a
Compare
Build FAILURE |
furiel
force-pushed
the
filter-function
branch
from
September 18, 2020 09:36
2b5913a
to
13dbd98
Compare
Build FAILURE |
furiel
force-pushed
the
filter-function
branch
from
September 18, 2020 09:42
13dbd98
to
bbcd43f
Compare
Build FAILURE |
furiel
force-pushed
the
filter-function
branch
2 times, most recently
from
September 18, 2020 10:13
a696158
to
fe8ac83
Compare
Build SUCCESS |
Signed-off-by: Antal Nemes <antal.nemes.hu@gmail.com> Signed-off-by: Balazs Scheidler <bazsi77@gmail.com>
furiel
force-pushed
the
filter-function
branch
from
September 18, 2020 10:47
fe8ac83
to
e14b2ad
Compare
Build SUCCESS |
furiel
changed the title
[WIP] new filter template function, and fix if inside map
new filter template function, and fix if inside map
Sep 18, 2020
furiel
changed the title
new filter template function, and fix if inside map
[WIPnew filter template function, and fix if inside map
Sep 22, 2020
furiel
changed the title
[WIPnew filter template function, and fix if inside map
[WIP] new filter template function, and fix if inside map
Sep 22, 2020
Signed-off-by: Antal Nemes <antal.nemes.hu@gmail.com> Signed-off-by: Balazs Scheidler <bazsi77@gmail.com>
Signed-off-by: Antal Nemes <antal.nemes.hu@gmail.com> Signed-off-by: Balazs Scheidler <bazsi77@gmail.com>
That way if template function can work inside map. See unit tests. Signed-off-by: Antal Nemes <antal.nemes.hu@gmail.com>
Signed-off-by: Antal Nemes <antal.nemes.hu@gmail.com>
Signed-off-by: Antal Nemes <antal.nemes.hu@gmail.com>
Signed-off-by: Antal Nemes <antal.nemes.hu@gmail.com>
furiel
force-pushed
the
filter-function
branch
from
September 22, 2020 15:07
e14b2ad
to
3d84a66
Compare
furiel
changed the title
[WIP] new filter template function, and fix if inside map
new filter template function, and fix if inside map
Sep 22, 2020
Build SUCCESS |
Kokan
approved these changes
Sep 24, 2020
alltilla
approved these changes
Oct 1, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Feature
A new
filter
template function is introduced in syslog-ng. Given a list, it executes a filter expression on each element, keeping only those that satisfy the filter expression. You can use macros, logical expressions, template functions inside the expression.The current value is referred by
$_
, similarly to themap
template function.Syntax:
Example
Filtering even numbers:
results in
0,2
.Bugfix
As
context_id
-s weren't passed when evaluatingFilterExprNodes
,if
template function could not use$_
: it received NULL (""
) instead.For example, these configurations will work after this PR:
with result:
even,odd,even,odd
.Referring: #2926
CC: @jszigetvari