Skip to content

cfg: fix config-version incosistencies#312

Merged
OverOrion merged 2 commits intoaxoflow:mainfrom
MrAnno:fix-no-version-inconsistency
Sep 30, 2024
Merged

cfg: fix config-version incosistencies#312
OverOrion merged 2 commits intoaxoflow:mainfrom
MrAnno:fix-no-version-inconsistency

Conversation

@MrAnno
Copy link
Contributor

@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
Contributor 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
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