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

cfg: fix config-version incosistencies #312

Merged
merged 2 commits into from
Sep 30, 2024

Conversation

MrAnno
Copy link
Member

@MrAnno MrAnno commented Sep 26, 2024

Template functions, for example, are constructed right when AxoSyslog parses the configuration, so the @version directive must be placed at the top of the config file to make it consistent.

This patch fixes the implicit "current version" mechanism (when no @version is specified) by moving it back to the lexer, and warns the user about misplaced or redefined @version directives.

Template functions, for example, are constructed right when AxoSyslog
parses the configuration, so the `@version` directive must be placed at
the top of the config file to make it consistent.

This patch fixes the implicit "current version" mechanism (when no
`@version` is specified) by moving it back to the lexer, and warns the
user about misplaced or redefined `@version` directives.

Signed-off-by: László Várady <[email protected]>
Signed-off-by: László Várady <[email protected]>
@MrAnno
Copy link
Member Author

MrAnno commented Sep 26, 2024

Reproducer: Place a template("$(format-json asd=asd)" anywhere in the configuration without an explicit @version declaration or place the @version declaration after the config block containing the mentioned template. A compatibility warning will be produced and AxoSyslog will operate in half-"compat mode".

@MrAnno MrAnno removed the request for review from bshifter September 30, 2024 07:54
@OverOrion OverOrion merged commit f0b42de into axoflow:main Sep 30, 2024
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants