mirror of
https://github.com/eworm-de/routeros-scripts.git
synced 2025-07-25 13:24:30 +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;
|
:global FwAddrListTimeOut 1d;
|
||||||
|
|
||||||
# This defines what log messages to filter or include by topic or message
|
# This defines what log messages to filter or include by topic or message
|
||||||
# text. Regular expressions are supported. Do *NOT* set an empty string,
|
# text. Regular expressions are supported. An empty string has a special
|
||||||
# that will filter or include everything!
|
# meaning not to filter or include anything.
|
||||||
# These are filters, so excluding messages from forwarding.
|
# These are filters, so excluding messages from forwarding.
|
||||||
:global LogForwardFilter "(debug|info|packet|raw)";
|
:global LogForwardFilter "(debug|info|packet|raw)";
|
||||||
:global LogForwardFilterMessage [];
|
:global LogForwardFilterMessage "";
|
||||||
#:global LogForwardFilterMessage "message text";
|
#:global LogForwardFilterMessage "message text";
|
||||||
#:global LogForwardFilterMessage "(message text|another text|...)";
|
#:global LogForwardFilterMessage "(message text|another text|...)";
|
||||||
# ... and another setting with reverse logic. This includes messages even
|
# ... and another setting with reverse logic. This includes messages even
|
||||||
# if filtered above.
|
# if filtered above.
|
||||||
:global LogForwardInclude [];
|
:global LogForwardInclude "";
|
||||||
:global LogForwardIncludeMessage [];
|
:global LogForwardIncludeMessage "";
|
||||||
#:global LogForwardInclude "account";
|
#:global LogForwardInclude "account";
|
||||||
#:global LogForwardIncludeMessage "message text";
|
#:global LogForwardIncludeMessage "message text";
|
||||||
|
|
||||||
|
|
|
@ -57,6 +57,11 @@
|
||||||
:local MessageVal;
|
:local MessageVal;
|
||||||
:local MessageDups ({});
|
:local MessageDups ({});
|
||||||
|
|
||||||
|
:set LogForwardFilter [ $EitherOr $LogForwardFilter [] ];
|
||||||
|
:set LogForwardFilterMessage [ $EitherOr $LogForwardFilterMessage [] ];
|
||||||
|
:set LogForwardInclude [ $EitherOr $LogForwardInclude [] ];
|
||||||
|
:set LogForwardIncludeMessage [ $EitherOr $LogForwardIncludeMessage [] ];
|
||||||
|
|
||||||
:local LogForwardFilterLogForwardingCached [ $EitherOr [ $LogForwardFilterLogForwarding ] ("\$^") ];
|
:local LogForwardFilterLogForwardingCached [ $EitherOr [ $LogForwardFilterLogForwarding ] ("\$^") ];
|
||||||
:foreach Message in=[ /log/find where (!(message="") and \
|
:foreach Message in=[ /log/find where (!(message="") and \
|
||||||
!(message~$LogForwardFilterLogForwardingCached) and \
|
!(message~$LogForwardFilterLogForwardingCached) and \
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue