mirror of
https://github.com/eworm-de/routeros-scripts.git
synced 2025-08-03 09:44:35 +02:00
log-forward: cache the result of $LogForwardFilterLogForwarding
Looks like the function is called for every message to match otherwise. 😳
This commit is contained in:
parent
2294ac77a8
commit
072d349473
1 changed files with 2 additions and 1 deletions
|
@ -47,8 +47,9 @@ $ScriptLock $0;
|
|||
:local MessageVal;
|
||||
:local MessageDups ({});
|
||||
|
||||
:local LogForwardFilterLogForwardingCached [ $EitherOr [ $LogForwardFilterLogForwarding ] ("\$^") ];
|
||||
:foreach Message in=[ /log/find where (!(message="") and \
|
||||
!(message~[ $EitherOr [ $LogForwardFilterLogForwarding ] ("\$^") ]) and \
|
||||
!(message~$LogForwardFilterLogForwardingCached) and \
|
||||
!(topics~$LogForwardFilter) and !(message~$LogForwardFilterMessage)) or \
|
||||
topics~$LogForwardInclude or message~$LogForwardIncludeMessage ] do={
|
||||
:set MessageVal [ /log/get $Message ];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue