mirror of
https://git.eworm.de/cgit/routeros-scripts
synced 2025-08-04 02:04:56 +02:00
global-functions: $LogPrintOnce: detect and warn on possible crash
This commit is contained in:
parent
bd2301a28c
commit
43ecec854f
1 changed files with 5 additions and 0 deletions
|
@ -737,6 +737,11 @@
|
|||
:return false;
|
||||
}
|
||||
|
||||
:if ([ :len [ /log/find where message=($Name . ": " . $Message) ] ] > 0) do={
|
||||
$LogPrint warning $0 \
|
||||
("The message is already in log, scripting subsystem may have crashed before!");
|
||||
}
|
||||
|
||||
:set ($LogPrintOnceMessages->$Message) 1;
|
||||
$LogPrint $Severity $Name $Message;
|
||||
:return true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue