affile: add exclude-pattern() option to wildcard-file()#5416
Merged
HofiOne merged 2 commits intosyslog-ng:developfrom Jul 16, 2025
Merged
affile: add exclude-pattern() option to wildcard-file()#5416HofiOne merged 2 commits intosyslog-ng:developfrom
HofiOne merged 2 commits intosyslog-ng:developfrom
Conversation
Contributor
|
Can one of the admins verify this patch? |
1 similar comment
Contributor
|
Can one of the admins verify this patch? |
e786a29 to
14ebec0
Compare
Collaborator
|
@overhacked Thank you for your contribution. I will check it soon. |
Contributor
This Pull Request introduces config grammar changessyslog-ng/86cd95766159aa14b20569f55b78f72012da7b49 -> overhacked/overhacked/wildcard-exclusion Details--- a/source
+++ b/source
wildcard-file(
+ exclude-pattern(<string>)
)
|
HofiOne
requested changes
Jul 15, 2025
Collaborator
There was a problem hiding this comment.
@overhacked Apart from the 2 tiny style-check issues, it LGTM, nice job, thank you!
NOTE: You can ignore the FreeBSD error; it is (hopefully temporarily)a problem in the current state of the v15 ports.
modules/affile/wildcard-source.c
Outdated
| static gboolean | ||
| _init_exclude_pattern(WildcardSourceDriver *self) | ||
| { | ||
| if (self->exclude_pattern) { |
Collaborator
Add ability to refine wildcard-file( filename-pattern() ) option with exclude-pattern() to exclude some matching files. Example: match all *.log but exclude *.?.log. Signed-off-by: Ross Williams <[email protected]>
Signed-off-by: Ross Williams <[email protected]>
14ebec0 to
fb9fdf5
Compare
Contributor
Author
|
@HofiOne I fixed and rebased with the style corrections, but CI didn't seem to automatically re-run. Also, I did run |
HofiOne
added a commit
to syslog-ng/syslog-ng.github.io
that referenced
this pull request
Jul 21, 2025
Add documentation for syslog-ng/syslog-ng#5416 (merged).
This file contains hidden or 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
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.

Add ability to refine
wildcard-file( filename-pattern() )option withexclude-pattern()to exclude some matching files. Example: match all*.logbut exclude*.?.log.A new option for the wildcard-file source is added and a new functional test that ensures
exclude-pattern()works is included intests/functional. The new test is a separate test file, becauseexclude-patterndoesn't need to be tested with the samepoll/autoconfiguration variants that the rest of theaffiletests need to be exercised with.The implementation is just a new option in the module's config parser and one new logic test in
modules/affile/wildcard-source.c:_handle_file_created().