<div dir="ltr"><div><div><div><div><div>It writes it as a json array, here is a fragment from my manual tests:<br><br>[ "15", "26", "15" ]
<br><br></div>It was using time in hh:mm:ss format and tokening by colon(:). I'll add tests for it soon, but until then pasting output here is the best I can do.<br></div><div><br></div>The idea behind this is to generate structured content from semi-structured or unstructured log messages. So array is a good representation for tokenized-value (it is multi-valued by nature, and array is a good way to represent that).<br><br></div>But eventually we should allow user to register value-transformers so that it can be pre-processed before its emitted. May be have a canned set of transformers, and allow user to plug in new ones.<br><br></div>My first instinct was to utilize variable support for this, infact this was the motivator for variable support. But it still leads to a fairly complex config for an access log with 15 - 20 fields, especially given those fields can have colon separated entries inside comma separated entries etc.<br><br></div>So I felt the need for a simpler way of doing it, hence this and other (recurse) field-type.<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Oct 31, 2014 at 3:23 PM, David Lang <span dir="ltr"><<a href="mailto:david@lang.hm" target="_blank">david@lang.hm</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Fri, 31 Oct 2014, singh.janmejay wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Tokenizer followed by tokenizer is something that I have in mind too. But I<br>
promised myself that i'd write a test for that instead of testing it<br>
manually :-). Will add that patch on this thread once I get a chance to<br>
work on it.<br>
</blockquote>
<br></span>
At least in the short term, you can use the ability to call mmnormalize on a variable to parse subvariables.<br>
<br>
How are the resulting fields addressed? Rsyslog hasn't had array addressing yet.<span class="HOEnZb"><font color="#888888"><br>
<br>
David Lang</font></span><div class="HOEnZb"><div class="h5"><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
However, since you are asking about those kind of forms, let met discuss<br>
something else that I was thinking about.<br>
<br>
The idea is to have another field type called recurse.<br>
<br>
Similar to how tokenized uses a ctx to parse matching text, recurse will<br>
parse it using the current context. AFAIK, the context is stateless, so I<br>
don't see any problems with that. I also plan to support tag based picking<br>
of which rules the text may match, and if it matches something else, it<br>
should be considered no-match.<br>
<br>
Instead of typing it out here, i'll attach a picture I took after thinking<br>
through it briefly(i'll attach it to the next mail).<br>
<br>
</blockquote>
</div></div><br>_______________________________________________<br>
Lognorm mailing list<br>
<a href="mailto:Lognorm@lists.adiscon.com">Lognorm@lists.adiscon.com</a><br>
<a href="http://lists.adiscon.net/mailman/listinfo/lognorm" target="_blank">http://lists.adiscon.net/mailman/listinfo/lognorm</a><br>
<br>_______________________________________________<br>
Lognorm mailing list<br>
<a href="mailto:Lognorm@lists.adiscon.com">Lognorm@lists.adiscon.com</a><br>
<a href="http://lists.adiscon.net/mailman/listinfo/lognorm" target="_blank">http://lists.adiscon.net/mailman/listinfo/lognorm</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br>Regards,<br>Janmejay<br><a href="http://codehunk.wordpress.com">http://codehunk.wordpress.com</a><br>
</div>