From f75e701be3ceb89615bd29a2bce1404f1bf4117c Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Mon, 30 Sep 2024 21:51:31 +0200 Subject: log-forward: get last message from log... ... not only from matched massages. --- log-forward.rsc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/log-forward.rsc b/log-forward.rsc index 5133e73..e0d8f35 100644 --- a/log-forward.rsc +++ b/log-forward.rsc @@ -94,9 +94,10 @@ [ $IfThenElse ($Duplicates = true) (" Multi-repeated messages have been skipped.") ] . \ [ $IfThenElse ($LogForwardRateLimit > 30) ("\nRate limit in action, delaying forwarding.") ] . \ "\n" . $Messages) }); - - :set LogForwardLast ($MessageVal->".id"); } else={ :set LogForwardRateLimit [ $MAX 0 ($LogForwardRateLimit - 1) ]; } + + :local LogAll [ /log/find ]; + :set LogForwardLast ($LogAll->([ :len $LogAll ] - 1) ); } on-error={ } -- cgit v1.2.3-70-g09d2