mirror of
https://github.com/eworm-de/routeros-scripts.git
synced 2025-07-24 04:44:33 +02:00
log-forward: make empty string a special meaning
This commit is contained in:
parent
fefe11d1e8
commit
fc3beac83b
2 changed files with 10 additions and 5 deletions
|
@ -119,17 +119,17 @@
|
|||
:global FwAddrListTimeOut 1d;
|
||||
|
||||
# This defines what log messages to filter or include by topic or message
|
||||
# text. Regular expressions are supported. Do *NOT* set an empty string,
|
||||
# that will filter or include everything!
|
||||
# text. Regular expressions are supported. An empty string has a special
|
||||
# meaning not to filter or include anything.
|
||||
# These are filters, so excluding messages from forwarding.
|
||||
:global LogForwardFilter "(debug|info|packet|raw)";
|
||||
:global LogForwardFilterMessage [];
|
||||
:global LogForwardFilterMessage "";
|
||||
#:global LogForwardFilterMessage "message text";
|
||||
#:global LogForwardFilterMessage "(message text|another text|...)";
|
||||
# ... and another setting with reverse logic. This includes messages even
|
||||
# if filtered above.
|
||||
:global LogForwardInclude [];
|
||||
:global LogForwardIncludeMessage [];
|
||||
:global LogForwardInclude "";
|
||||
:global LogForwardIncludeMessage "";
|
||||
#:global LogForwardInclude "account";
|
||||
#:global LogForwardIncludeMessage "message text";
|
||||
|
||||
|
|
|
@ -57,6 +57,11 @@
|
|||
:local MessageVal;
|
||||
:local MessageDups ({});
|
||||
|
||||
:set LogForwardFilter [ $EitherOr $LogForwardFilter [] ];
|
||||
:set LogForwardFilterMessage [ $EitherOr $LogForwardFilterMessage [] ];
|
||||
:set LogForwardInclude [ $EitherOr $LogForwardInclude [] ];
|
||||
:set LogForwardIncludeMessage [ $EitherOr $LogForwardIncludeMessage [] ];
|
||||
|
||||
:local LogForwardFilterLogForwardingCached [ $EitherOr [ $LogForwardFilterLogForwarding ] ("\$^") ];
|
||||
:foreach Message in=[ /log/find where (!(message="") and \
|
||||
!(message~$LogForwardFilterLogForwardingCached) and \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue