On Tue, 28 Apr 2015, Tait Clarridge wrote:
On Tue, Apr 28, 2015 at 8:24 AM, Rainer Gerhards
<[email protected]> wrote:
Hi all,
I receive a new parser contribution, please see here:
https://github.com/rsyslog/liblognorm/pull/44
All looks great, except that the name for the new parser is "string",
what I consider overly generic. Probably "bash-like-string" would be
better, but still not perfect IMHO.
Are there any suggestions here in the group?
Thanks,
Rainer
Perhaps "posix-string" or "safe-string"?
is there a posix spec we can point to if we use posix-string?
It's not really any safer than other sting types
I see three paths we can go down
1. create a new type, escaped-string and have flags to be able to disable some
of the escaping, specify if the outer quotes should be included or not, and
possibly specify some additional escape decoding (I'd like an option to recover
the rsyslog #xxx control characters for example)
2. replace one of the existing types, adding flags to enable these features
3. replace one of the existng types, enabling new features by default and adding
flags to disable them. This has the potential to break some existing configs,
but in the vast majority of cases it will not.
In any case, I think that the other string types should be redefined to be this
new type with specific options (i.e. effectively turn them into macros) to
eliminate code duplication.
The big problem with #1 is that we are getting to have more and more parsers,
how is someone supposed to know which one to use and remember the right name for
it.
requiring flags to be enable the functionality is slightly better, but the
question is if these are things that should be enabled unless they cause grief,
or disabled unless absolutly required.
I think that using \ escaped characters in strings is a pretty common thing to
do, so I think it's very reasonable to have this enabled by default.
David Lang
_______________________________________________
rsyslog mailing list
http://lists.adiscon.net/mailman/listinfo/rsyslog
http://www.rsyslog.com/professional-services/
What's up with rsyslog? Follow https://twitter.com/rgerhards
NOTE WELL: This is a PUBLIC mailing list, posts are ARCHIVED by a myriad of
sites beyond our control. PLEASE UNSUBSCRIBE and DO NOT POST if you DON'T LIKE
THAT.