Hi David:

In message <[email protected]>,
david at lang.hm writes:
>I am creating rules that accumulate log lines into a context for a later 
>report.
>
>since these are _long_ log lines, they will wrap in the e-mail client when 
>I send them. I would like to add an extra newline when I add text to the 
>context, but I cannot figure out how to make this work.

Maybe use sub-pattern matches to break the line into multiple pieces and add
each piece?

  pattern=^(.*some matching thing)(.{60})(.*)
  action = add context $1; add context $2; add context $3

I think that will add three lines.

Use eval to create a perl function that will format its argument by
inserting newlines.  Then in your action calling it on $0 "call
%{result} %{eval_fnction_handle} $0; add context %{result}".

When you report the context you could pipe it through fmt or some
other formatting program (but that may not be better than the wrapping
in the email client).

If you just need a newline after each line you add, assign a variable to
newline and add it:

  assign %N \n; add context %N;

I am not sure if \n works for setting a newline though.

Let us know which of these ideas work.
--
                                -- rouilj
John Rouillard
===========================================================================
My employers don't acknowledge my existence much less my opinions.

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Simple-evcorr-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/simple-evcorr-users

Reply via email to