2011/4/17 Risto Vaarandi <risto.vaara...@gmail.com>:
> 2011/4/15 John Grasett <john.gras...@atech.com>:
>> Yes, that sounds perfect. I could also then do this to not repeat on the
>> same event in the same log.
>>
>> type=single
>> ptype=perlfunc
>> pattern=sub { if ($_[0] =~ /.*(SRVE0255E).*/) { \
>>   return ($1, $_[1]); } else { return 0; } }
>> context=!IGNORE_SRVE0255E_FOR_FILE_$2
>> desc=$0
>> action=logonly Error reported by Application: %app on Layer: %layer:
>> $1 caught in: $2; create IGNORE_SRVE0255E_FOR_FILE_$2
>>
>>
>> One other thing I am triyng to do with no luck - change $2 to be only part
>> of the log path/filename:
>>
>> type=single
>> ptype=perlfunc
>> pattern=sub { if ($_[0] =~ /.*(SRVE0255E).*/) { \
>> return ($1, $_[1], $_[2] =~ m/.*\/(.*)\.SystemOut\.log$/); } else { return
>> 0; } }
>> desc=$0
>> action=logonly Error reported by Application: %app on Layer: %layer: $1
>> caught in: $2
>>
>> or I try
>>
>> return ($1, $_[1] =~ m/.*\/(.*)\.SystemOut\.log$/); } else { return 0; } }
>>
>>  But then I get bad output!
>
> John,
> PerlFunc pattern function accepts two input parameters ($_[0] and
> $_[1]), thus $_[2] is undefined for this pattern (PerlFunc2,
> PerlFunc3, PerlFunc4 etc. take 2,4,6,... parameters).

sorry for a typo -- PerlFunc takes 2 input parameters (one input line
and one source name), PerlFunc2 takes 4 parameters (two input lines
and two source names), PerlFunc3 takes 6, etc.
regards,
risto

------------------------------------------------------------------------------
Benefiting from Server Virtualization: Beyond Initial Workload 
Consolidation -- Increasing the use of server virtualization is a top
priority.Virtualization can reduce costs, simplify management, and improve 
application availability and disaster protection. Learn more about boosting 
the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev
_______________________________________________
Simple-evcorr-users mailing list
Simple-evcorr-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/simple-evcorr-users

Reply via email to