mirror of
https://github.com/eworm-de/routeros-scripts.git
synced 2024-05-11 05:55:19 +00: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:
@ -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 ];
|
||||
|
Reference in New Issue
Block a user