aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2021-03-17 08:55:33 +0100
committerGravatar Christian Hesse <mail@eworm.de>2021-03-17 08:55:33 +0100
commit5610926d0af994aad826dc031ebbd587144cb965 (patch)
tree58966b0fb4a2e7725cc115edb880d0bdc11597e9
parent7c4ab95394094d35499429504c6d393df27f08a9 (diff)
log-forward: use $EscapeForRegEx
-rw-r--r--log-forward8
1 files changed, 4 insertions, 4 deletions
diff --git a/log-forward b/log-forward
index 2866e2f..8842c7c 100644
--- a/log-forward
+++ b/log-forward
@@ -17,7 +17,7 @@
:global LogForwardRateLimit;
:global NotificationsWithSymbols;
-:global CharacterReplace;
+:global EscapeForRegEx;
:global IfThenElse;
:global LogPrintExit2;
:global QuotedPrintable;
@@ -45,9 +45,9 @@ $WaitFullyConnected;
:local MessageVal;
:local MessageDups [ :toarray "" ];
-:local LogForwardFilterLogForwarding [ $CharacterReplace ("^Error sending e-mail <" . \
- [ $QuotedPrintable ("\\[" . $Identity . "\\] " . [ $SymbolForNotification "warning-sign" ] . \
- "Log Forwarding") ] . ">:") ("\?") ("\\\?") ];
+:local LogForwardFilterLogForwarding ("^" . [ $EscapeForRegEx ("Error sending e-mail <" . \
+ [ $QuotedPrintable ("[" . $Identity . "] " . [ $SymbolForNotification "warning-sign" ] . \
+ "Log Forwarding") ] . ">:") ]);
:foreach Message in=[ / log find where !(topics~$LogForwardFilter) !(message="") \
!(message~$LogForwardFilterLogForwarding) !(message~$LogForwardFilterMessage) ] do={
:set MessageVal [ / log get $Message ];