diff options
author | Christian Hesse <mail@eworm.de> | 2021-02-22 15:14:10 +0100 |
---|---|---|
committer | Christian Hesse <mail@eworm.de> | 2021-02-24 21:51:54 +0100 |
commit | f46db918453dcb8878b9a0de6e122fb0ea2224d9 (patch) | |
tree | 31544a450651d0705ecdea0c3d35e650ef784d67 /log-forward | |
parent | b0e52aa2d1baa78fc9d025c0671fea8babba0ec2 (diff) |
global: give script or function name in log messages
Diffstat (limited to 'log-forward')
-rw-r--r-- | log-forward | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/log-forward b/log-forward index c4458b2..e90e720 100644 --- a/log-forward +++ b/log-forward @@ -6,6 +6,7 @@ # forward log messages via notification # https://git.eworm.de/cgit/routeros-scripts/about/doc/log-forward.md +:local 0 "log-forward"; :global GlobalFunctionsReady; :while ($GlobalFunctionsReady != true) do={ :delay 500ms; } @@ -16,7 +17,7 @@ :global LogForwardRateLimit; :global IfThenElse; -:global LogPrintExit; +:global LogPrintExit2; :global ScriptLock; :global SendNotification; :global SymbolForNotification; @@ -30,7 +31,7 @@ $ScriptLock "log-forward"; :if ($LogForwardRateLimit > 30) do={ :set LogForwardRateLimit ($LogForwardRateLimit - 1); - $LogPrintExit info ("Rate limit in action, not forwarding logs, if any!") true; + $LogPrintExit2 info $0 ("Rate limit in action, not forwarding logs, if any!") true; } $WaitFullyConnected; |