-
Notifications
You must be signed in to change notification settings - Fork 64
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 support for nested objects with exclamation mark #375
base: master
Are you sure you want to change the base?
Conversation
@rgerhards : What do you think of this PR please ? |
I was busy, bear with me ;-) But I've seen the proposal just 5 mins ago (reading mail sequentially). I agree it is useful. I don't like breaking changes. This one sounds reasonable. I would tend to say that I see some solutions, though, for making it optional.
What do you think? @davidelang what's your take on this? |
Thank you for your answer :-) If you really don't want breaking change, I like your first option "version=3" ! |
perfect, so be it :-) Could you include that change in your PR? |
sorry I missed this, yes this is a greatly desired functionality, I like the version 3 to avoid breaking (rare) existing configs. I like expanding the list of reserved characters. As I understand it, some things (elasticsearch IIRC) use '.' instead of '!' for their separator character. reserving '.' is far more likely to break configs, but with the version change, we can get away with doing so. I'm not thrilled at making it only apply to the json syntax, the old syntax is just so straightforward in many cases. |
Thank you for your feedback. The only "breaking change" I just add is this line :
Which is a breaking change for calling mmnormalize module in Rsyslog with Is that ok for you both ? |
@rgerhards , @davidelang : What's your opinion please ? |
sry - didn't notice the message. Yes, for mmnormalize this sounds acceptable to me. Unlikely it will hit hard there. |
In any case, we need some doc update :-) |
My only question is, since we are making a version jump, should we reserve any
other characters besides '!'?
David Lang
…On Wed, 25 Oct 2023, Rainer Gerhards wrote:
Date: Wed, 25 Oct 2023 06:33:52 -0700
From: Rainer Gerhards ***@***.***>
Reply-To: rsyslog/liblognorm
***@***.***>
To: rsyslog/liblognorm ***@***.***>
Cc: David Lang ***@***.***>, Mention ***@***.***>
Subject: Re: [rsyslog/liblognorm] Add support for nested objects with
exclamation mark (PR #375)
In any case, we need some doc update :-)
|
Actual behavior
Currently, when using the following rulebase :
And the following line to parse :
The result is :
New behavior
With the proposed improvement, when using the same rulebase and the same line to parse as above, the result is now :
Note that this is a breaking change in case of using exclamation mark in captured names.
Notes
I tried to add the new behavior as an option, for example by adding "nested=" at the beginning of rulebase files, but I encountered some issues by using file inclusion or with the Rsyslog mmnormalize module by using the directive "rule=".
Please let me know if you have a better option to add this new behavior as a option, or to prevent breaking change, but this new behavior makes sens regarding the access of nested variables in Rsyslog by using exclamation marks.