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

add 'exists()' script function to check if variable exists #4435

Merged
merged 1 commit into from Oct 6, 2020

Conversation

rgerhards
Copy link
Member

@rgerhards rgerhards commented Oct 2, 2020

This implements a way to check if rsyslog variables (e.g. '$!path!var') is
currently set of not.

closes #4385

@rgerhards
Copy link
Member Author

see also #4434 which is related and in parts conflicting; we need some additional tests for both this PR and #4434 to ensure we do not break backwards compatibility.

@rgerhards
Copy link
Member Author

there was only one issue in regard to backwards compatibility, and this is solved: #4436

@rgerhards
Copy link
Member Author

The PR itself is now ready to be merged, except for missing doc. Tests for new functionality added and passing. @davidelang @julthomas

@rgerhards rgerhards changed the title INCOMPLETE: add 'exists()' script function to check if variable exists add 'exists()' script function to check if variable exists Oct 5, 2020
This implements a way to check if rsyslog variables (e.g. '$!path!var') is
currently set of not.

Sample: if exists($!somevar) then ...

closes rsyslog#4385
rgerhards added a commit to rgerhards/rsyslog-doc that referenced this pull request Oct 5, 2020
@rgerhards rgerhards merged commit 3c217ad into rsyslog:master Oct 6, 2020
@rgerhards rgerhards deleted the i4385 branch October 6, 2020 08:39
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.

Add functionality to check whether the variable was set (isset function)
1 participant