diff options
author | Christian Hesse <mail@eworm.de> | 2024-09-30 21:51:31 +0200 |
---|---|---|
committer | Christian Hesse <mail@eworm.de> | 2024-09-30 21:51:31 +0200 |
commit | f75e701be3ceb89615bd29a2bce1404f1bf4117c (patch) | |
tree | 0dfcffeb0dbc86bb2e8939c5765b6b8bce739ab6 | |
parent | f2576cf55892618c65fca6a1bff03b35a94acee8 (diff) |
log-forward: get last message from log...
... not only from matched massages.
-rw-r--r-- | log-forward.rsc | 5 |
1 files 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={ } |