2012/10/20 <[email protected]>: > On Sat, 20 Oct 2012, Risto Vaarandi wrote: > >> As for the naming convention -- Perl has a requirement that match >> variable names can consist of alphanumerals and underscores. >> Currently, similar sanity check has been implemented for SEC named >> match variables. However, it is always possible to change the list of >> allowed characters. Now my question -- how strict is the keyword >> definition for JSON and is the set of legal characters clearly >> defined, or can any printable characters be freely used? > > > JSON technically allows anything except " with / being an escape character. > > realistically, names (espcially names used in logs) should be able to be > much saner. > > project lumberjack, which is trying to do coordination of this across > different syslog immplementations among others, has a defined set of values > that they expect to see. They have this silly expectation that everyone will > follow their naming scheme > https://fedorahosted.org/lumberjack/wiki/FieldList#FieldNames while I think > that's being horribly optimistic, I think that there is no reason to be > incompatible with it if there is a way to avoid it :-) > > What they do is reserve ! as a field separator when flattening something > > so they would have source!ip where your example was source_ip > > none of their field names use _ > > rsyslog currently uses - in some internal field names (which will probably > leak out into the logs at some point) > > one special thing about _ is that whole-word matches in perl don't consider > _ to be a non-word character so a match or whole word replacement for source > will not match source_something while it would match source-something > >
hi David, I have completed some work on the alpha version of the next release, and it supports returning hashes from PerlFunc patterns. If the user defines a custom parsing scheme inside PerlFunc pattern, keyword=value pairs can now be returned as named match variables with a single hash. However, there are still few things I'd like to clarify. Perl regexp named captures assume that a name consist of alphanumerals and underscores (i.e., each name character must match \w) which is also the case for LumberJack. Nevertheless, Perl also assumes that named capture never begins with a number. Does LumberJack impose a similar restriction? This restriction allows for one nice optimization -- internally, named and numbered match variables can be stored in one hash table (for the latter, numbers are used as keywords). As a separator, I think it is quite easy to allow the use of ! inside variable names. kind regards, risto ------------------------------------------------------------------------------ LogMeIn Central: Instant, anywhere, Remote PC access and management. Stay in control, update software, and manage PCs from one command center Diagnose problems and improve visibility into emerging IT issues Automate, monitor and manage. Do more in less time with Central http://p.sf.net/sfu/logmein12331_d2d _______________________________________________ Simple-evcorr-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/simple-evcorr-users
