Re: [Simple-evcorr-users] action-list checking if log file is already open by SEC

2020-04-02 Thread Risto Vaarandi
hi Richard, let me provide few comments here. Since you mentioned setting up an associative array (Perl hash) that contains input file names, contexts are actually implemented as a Perl hash as well in SEC code. Checking for the presence of the context involves a search for some key in a hash, and

Re: [Simple-evcorr-users] action-list checking if log file is already open by SEC

2020-04-01 Thread David Lang
00:17:40 +0200 From: Richard Ostrochovský To: simple-evcorr-users@lists.sourceforge.net Subject: Re: [Simple-evcorr-users] action-list checking if log file is already open by SEC Hi Risto, thank you for the solution. There is also concern about potential performance impact in case of e.g

Re: [Simple-evcorr-users] action-list checking if log file is already open by SEC

2020-04-01 Thread Richard Ostrochovský
Hi Risto, thank you for the solution. There is also concern about potential performance impact in case of e.g. thousands of files being added by addinput with creating extra context for each of them. Another way could be e.g. maintaining (associative) array in action list, with keys of paths to a

Re: [Simple-evcorr-users] action-list checking if log file is already open by SEC

2020-02-20 Thread Risto Vaarandi
hi Richard, I think this scenario is best addressed by creating a relevant SEC context when 'addinput' action is called. In fact, handling such scenarios is one of the purposes of contexts, and here is an example rule which illustrates this idea: type=single ptype=regexp pattern=start monitoring

[Simple-evcorr-users] action-list checking if log file is already open by SEC

2020-02-20 Thread Richard Ostrochovský
Hello Risto and friends, having mechanism for dynamic opening (addinput) and closing (dropinput) files, I would like to be able to check, if the file is already opened, before trying to open it again, to avoid it. That way I would like to eliminate this error message from SEC log (present also in