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

Filterx function framework + example #18

Closed

Conversation

bshifter
Copy link

No description provided.

The lexer drops whitespace and leading commas but they should not make it
into token values.

Signed-off-by: Balazs Scheidler <[email protected]>
…xer level

Previously everything was captured as LL_IDENTIFIER, operators as well,
and then mapped to tokens using the keyword mechanism. Since I'd like
to make the LL_IDENTIFIER pattern stricter, that wouldn't allow
typical operator characters into LL_IDENTIFIERS, so these should be
recognized at the lexer level.

NOTE: this does not include the spelled out operators like "lt" for "<",
those remain LL_IDENTIFIER and are continued to be mapped using the
keyword mechanism.

Signed-off-by: Balazs Scheidler <[email protected]>
Signed-off-by: Balazs Scheidler <[email protected]>
Some objects can be used by multiple threads (e.g. the ones created
as literals during configuration parsing). Our ref count is not atomic
and I don't intend to make it one.

By making an object "frozen" it's reference count is set to an
extremal value and from then on, ref/unref does not change the refcount.

Signed-off-by: Balazs Scheidler <[email protected]>
Signed-off-by: Balazs Scheidler <[email protected]>
Signed-off-by: Balazs Scheidler <[email protected]>
Signed-off-by: Balazs Scheidler <[email protected]>
Signed-off-by: Balazs Scheidler <[email protected]>
Signed-off-by: Balazs Scheidler <[email protected]>
bazsi and others added 22 commits December 5, 2023 12:50
These objects may be used by multiple threads, as they are allocated at
parsing time.  Make sure they don't get freed, nor do we race on their
ref_cnt by freezing them.

Signed-off-by: Balazs Scheidler <[email protected]>
Signed-off-by: Balazs Scheidler <[email protected]>
`node_to_insert` seems to only contain a single patterndb expression in
all other examples, so align with them.

Signed-off-by: Romain Tartière <[email protected]>
When parsing a message, NLSTRING stops when it finds a `\n` char.  If
the message does not contain any `\n` char, the matching fail and the
message portion is not matched.

However, the documentation says that:
> For single-line messages, NLSTRING is equivalent with ANYSTRING

In order to match what the documentation say, we need to not return an
error when `\n` is not found, and instead capture the end of the
message.

Signed-off-by: Romain Tartière <[email protected]>
Sometimes we are casting strings with an explicit length value, but
the type hinting code simply assumed that everything was NUL terminated,
which is not the case for indirect values.

Signed-off-by: Balazs Scheidler <[email protected]>
Signed-off-by: shifter <[email protected]>
As it has significant overhead. Do it a few times every second.

Signed-off-by: Balazs Scheidler <[email protected]>
Signed-off-by: Balazs Scheidler <[email protected]>
@bazsi bazsi force-pushed the filter-expr-language branch 5 times, most recently from 1681932 to b29ccba Compare December 12, 2023 20:42
@bazsi bazsi closed this Jan 6, 2024
bazsi pushed a commit that referenced this pull request May 17, 2024
axosyslog-collector: add image.extraArgs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants