mirror of
https://github.com/gbudny93/RouterOS_Useful_Scripts.git
synced 2025-06-28 20:40:21 +02:00
Initial Commit. Script Draft Creation
This commit is contained in:
parent
fcb757bfbc
commit
7cc09bc801
1 changed files with 65 additions and 2 deletions
|
@ -1,2 +1,65 @@
|
|||
#log print where message~"telnet"
|
||||
#log print file=
|
||||
:global LogFilter do={
|
||||
|
||||
:local message #message
|
||||
:local time #time
|
||||
:local topics #topic
|
||||
:local isFile false
|
||||
:local fileName #fileName
|
||||
:local isFilterByMessage true
|
||||
:local isFilterByTime false
|
||||
:local isFiltereByTopic false
|
||||
|
||||
:if($isFile) do={
|
||||
|
||||
:if($isFilterByMessage) do={
|
||||
|
||||
:log print file=$fileName where message~$message
|
||||
|
||||
}
|
||||
|
||||
:if($isFilterByTime) do={
|
||||
|
||||
:log print file=$fileName where time~$time
|
||||
|
||||
}
|
||||
|
||||
:if($isFiltereByTopic) do={
|
||||
|
||||
:log print file=$fileName where topic~$topic
|
||||
|
||||
}
|
||||
|
||||
else={
|
||||
|
||||
:log print file=$fileName
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
else={
|
||||
|
||||
:if($isFilterByMessage) do={
|
||||
|
||||
:log print where message~$message
|
||||
|
||||
}
|
||||
|
||||
:if($isFilterByTime) do={
|
||||
|
||||
:log print where time~$time
|
||||
|
||||
}
|
||||
|
||||
:if($isFiltereByTopic) do={
|
||||
|
||||
:log print where topic~$topic
|
||||
|
||||
}
|
||||
|
||||
else={
|
||||
|
||||
:log print
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue