aboutsummaryrefslogtreecommitdiffstats
path: root/log-forward
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2021-04-28 20:16:08 +0200
committerGravatar Christian Hesse <mail@eworm.de>2021-04-28 20:16:08 +0200
commitda877612209b217fdfd5429889b6d7284bfd10a5 (patch)
tree17fae6776664e6c550c3ba3b2ea7025779b9c35e /log-forward
parentd4c9d1c577d14991a63f285e57fcf2cfaa2d5cd4 (diff)
parent56b75237754eb065aecb932b3082ba0ca29c3f7c (diff)
Merge branch 'notifications' into next
Diffstat (limited to 'log-forward')
-rw-r--r--log-forward13
1 files changed, 7 insertions, 6 deletions
diff --git a/log-forward b/log-forward
index 8842c7c..8f72893 100644
--- a/log-forward
+++ b/log-forward
@@ -22,7 +22,7 @@
:global LogPrintExit2;
:global QuotedPrintable;
:global ScriptLock;
-:global SendNotification;
+:global SendNotification2;
:global SymbolForNotification;
:global WaitFullyConnected;
@@ -71,11 +71,12 @@ $WaitFullyConnected;
}
:if ($Count > 0) do={
- $SendNotification ([ $SymbolForNotification "warning-sign" ] . "Log Forwarding") \
- ("The log on " . $Identity . " contains " . [ $IfThenElse ($Count = 1) \
- "this message" ("these " . $Count . " messages") ] . " after " . \
- [ / system resource get uptime ] . " uptime." . [ $IfThenElse ($Duplicates = true) \
- (" Multi-repeated messages have been skipped.") ] . "\n" . $Messages);
+ $SendNotification2 ({ origin=$0; \
+ subject=([ $SymbolForNotification "warning-sign" ] . "Log Forwarding"); \
+ message=("The log on " . $Identity . " contains " . [ $IfThenElse ($Count = 1) \
+ "this message" ("these " . $Count . " messages") ] . " after " . \
+ [ / system resource get uptime ] . " uptime." . [ $IfThenElse ($Duplicates = true) \
+ (" Multi-repeated messages have been skipped.") ] . "\n" . $Messages) });
:set LogForwardRateLimit ($LogForwardRateLimit + 10);
:set LogForwardLast ($MessageVal->".id");