aboutsummaryrefslogtreecommitdiffstats
path: root/early-errors
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2020-04-24 23:14:58 +0200
committerGravatar Christian Hesse <mail@eworm.de>2020-04-24 23:22:14 +0200
commit940c1e9381e289a4224987bddeeae52a3d23d770 (patch)
treeb0c1a67cd1446efed5088e56c376d15682424ab8 /early-errors
parent0a48f37918f1c9ec202f4a0f3e598f2724ddb7a6 (diff)
early-errors: get errors into array
Diffstat (limited to 'early-errors')
-rw-r--r--early-errors5
1 files changed, 3 insertions, 2 deletions
diff --git a/early-errors b/early-errors
index ad871f6..eaee745 100644
--- a/early-errors
+++ b/early-errors
@@ -9,11 +9,12 @@
:global SendNotification;
-:local ErrCount [ / log print count-only where topics~"error" ];
+:local Errors [ / log find where topics~"error" ];
+:local ErrCount [ :len $Errors ];
:if ($ErrCount > 0) do={
:local Message ("The log on " . $Identity . " contains " . $ErrCount . \
" errors after " . [ / system resource get uptime ] . " uptime.\n");
- :foreach Log in=[ / log find where topics~"error" ] do={
+ :foreach Log in=$Errors do={
:local LogVal [ / log get $Log ];
:set Message ($Message . "\n" . [ :tostr ($LogVal->"topics") ] . \
" " . ($LogVal->"message"));