In message <[email protected]>,
Risto Vaarandi writes:

>I have finished working on the new input buffering scheme which allows 
>for using separate input buffers for each input source (plus a separate 
>buffer for synthetic events). The old one-buffer-for-all scheme is also 
>present in the code, and the work mode can be changed with --jointbuf 
>and --nojointbuf options. This added functionality will make multiple 
>line patterns much more useful, and would also make event rewriting more 
>powerful.
>
>I've now started to think how the rewriting can actually be done. A 
>separate rule is one option, but my personal preference lies with a 
>special 'rewrite' or 'replace' action (an action would allow for 
>rewriting from any rule type). With an action, there are several 
>implementation avenues:
>
>1) rewrite <somestring> -- if <somestring> is made up of N lines, the 
>action will replace last N lines in the input buffer with <somestring>.
>
>2) rewrite <amount> <somestring> -- <amount> specifies the number of 
>lines which need rewriting. If <somestring> contains more than <amount> 
>lines, only first <amount> lines are written; if <somestring> has lesser 
>amount of lines, leading empty lines will be added.

I am not sure if this is better, but you could require the use of 
regexpN/substrN
to match/replace more than one line. 

type = single
ptype = regexp4
pattern = ...
action = rewrite ,new $1 $6 %a value,

would rewrite 4 lines in the buffer to a single line. Also I often have a 
sequence
of lines whose length is unknown beforehand. I currently create a new event 
from the contents of a context and put the event on the event stream. Ideally
I would like to replace all the events from the start event to the end
event with my single line event, but I don't have a count of the number of
lines. 
 
I'm not sure that's a solvable problem.

--
                                -- rouilj
John Rouillard
===========================================================================
My employers don't acknowledge my existence much less my opinions.

------------------------------------------------------------------------------
Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex
infrastructure or vast IT resources to deliver seamless, secure access to
virtual desktops. With this all-in-one solution, easily deploy virtual 
desktops for less than the cost of PCs and save 60% on VDI infrastructure 
costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox
_______________________________________________
Simple-evcorr-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/simple-evcorr-users

Reply via email to