mirror of
https://github.com/eworm-de/routeros-scripts
synced 2024-05-14 08:04:19 +00:00
global-functions: introduce $LogAndPut
This commit is contained in:
parent
3ebf68a08c
commit
312caf3f90
1 changed files with 10 additions and 0 deletions
|
@ -38,6 +38,7 @@
|
|||
:global TimeIsSync;
|
||||
:global WaitTimeSync;
|
||||
:global LogAndError;
|
||||
:global LogAndPut;
|
||||
|
||||
# url encoding
|
||||
:set UrlEncode do={
|
||||
|
@ -498,3 +499,12 @@
|
|||
[ :parse (":log " . $Severity . " \$Message") ];
|
||||
:error ($Severity . ": " . $Message);
|
||||
}
|
||||
|
||||
# log and put (print on terminal) same text
|
||||
:set LogAndPut do={
|
||||
:local Severity [ :tostr $1 ];
|
||||
:local Message [ :tostr $2 ];
|
||||
|
||||
[ :parse (":log " . $Severity . " \$Message") ];
|
||||
:put ($Severity . ": " . $Message);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue