RB reboot on log topic

What is the simplest method of rebooting RB when log topic = ‘gsm, error’
RB used to work fine for 2-3 months without rebooting.
For some time (new packages?), several times a week I got logs like this:

Sep/04/2017 16:13:51 gsm,error sms send failed: missing port value
Sep/07/2017 08:20:24 gsm,error unable to load unread sms: cannot open port

only reboot helps

Add scheduler which runs script like this:

if ([:len [/system logging find where topic~“gsm,error”]] > 0) do={
:execute script=“/system reboot”
}

Are you sure that you will not see logs also after reboot and lock yourself into reboot loop?

thx for reply.
This is my logging

/system logging
set 0 action=memory disabled=no prefix="" topics=info
set 1 action=disk disabled=no prefix="" topics=error
set 2 action=disk disabled=no prefix="" topics=warning
set 3 action=echo disabled=no prefix="" topics=critica

I need error logs to be stored od disc, can i exclude gsm,errors from saving to the thist while keeping all other error logs on the disk?

You can create two topic
error → disk
error,gsm → memory

hi strods, i’m trying to make that work but shouldn’t it looks more like this?

if ([:len [/log find where topic=“gsm, error”]] > 0) do={
:execute script=“/system reboot”
}
instead of
/system logging find where topic~“gsm,error”]
?
anyway, both options do not work :confused: